summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-10-13 02:24:40 +0300
committerChris Mason <clm@fb.com>2015-10-13 02:24:40 +0300
commit6db4a7335dd701a0e20275440ee057d3db2a7ae3 (patch)
treec0734d7411806ef91bfeb615bf528ffb349938fe /fs/btrfs/disk-io.c
parent62fb50ab7c903357c92cef2f7677235b92ac575f (diff)
parentee86395458072760d62e66aad10a5e9e8902b8cf (diff)
downloadlinux-6db4a7335dd701a0e20275440ee057d3db2a7ae3.tar.xz
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/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 7f934cccc98d..a42c1f575ef7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -801,6 +801,9 @@ static void run_one_async_done(struct btrfs_work *work)
limit = btrfs_async_submit_limit(fs_info);
limit = limit * 2 / 3;
+ /*
+ * atomic_dec_return implies a barrier for waitqueue_active
+ */
if (atomic_dec_return(&fs_info->nr_async_submits) < limit &&
waitqueue_active(&fs_info->async_submit_wait))
wake_up(&fs_info->async_submit_wait);