From cd1cfc49153ba2bef247e500d8bd4d135193ece9 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Wed, 25 Jul 2012 16:03:32 -0400 Subject: [PATCH] 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 --- fs/btrfs/extent-tree.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 44f06201f376..4e1b153b7c47 100644 --- a/fs/btrfs/extent-tree.c +++ b/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); -- 2.20.1