Browse Source

Btrfs: add a barrier before a waitqueue_active check

We were missing wakeups on the delayed ref waitqueue due
to races on waitqueue_active.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Chris Mason 13 years ago
parent
commit
cd1cfc4915
1 changed files with 1 additions and 0 deletions
  1. 1 0
      fs/btrfs/extent-tree.c

+ 1 - 0
fs/btrfs/extent-tree.c

@@ -5294,6 +5294,7 @@ static noinline int check_ref_cleanup(struct btrfs_trans_handle *trans,
 	rb_erase(&head->node.rb_node, &delayed_refs->root);
 
 	delayed_refs->num_entries--;
+	smp_mb();
 	if (waitqueue_active(&root->fs_info->tree_mod_seq_wait))
 		wake_up(&root->fs_info->tree_mod_seq_wait);