aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason2015-10-12 16:24:40 -0700
committerChris Mason2015-10-12 16:24:40 -0700
commit6db4a7335dd701a0e20275440ee057d3db2a7ae3 (patch)
treec0734d7411806ef91bfeb615bf528ffb349938fe /fs/btrfs/volumes.c
parent62fb50ab7c903357c92cef2f7677235b92ac575f (diff)
parentee86395458072760d62e66aad10a5e9e8902b8cf (diff)
Merge branch 'fix/waitqueue-barriers' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.4
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index dd644d767782..cc1cc3559045 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -344,6 +344,9 @@ loop_lock:
pending = pending->bi_next;
cur->bi_next = NULL;
+ /*
+ * atomic_dec_return implies a barrier for waitqueue_active
+ */
if (atomic_dec_return(&fs_info->nr_async_bios) < limit &&
waitqueue_active(&fs_info->async_submit_wait))
wake_up(&fs_info->async_submit_wait);