diff options
author | Chris Mason <clm@fb.com> | 2015-10-12 19:24:40 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-12 19:24:40 -0400 |
commit | 6db4a7335dd701a0e20275440ee057d3db2a7ae3 (patch) | |
tree | c0734d7411806ef91bfeb615bf528ffb349938fe /fs/btrfs/volumes.c | |
parent | 62fb50ab7c903357c92cef2f7677235b92ac575f (diff) | |
parent | ee86395458072760d62e66aad10a5e9e8902b8cf (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.c | 3 |
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: | |||
344 | pending = pending->bi_next; | 344 | pending = pending->bi_next; |
345 | cur->bi_next = NULL; | 345 | cur->bi_next = NULL; |
346 | 346 | ||
347 | /* | ||
348 | * atomic_dec_return implies a barrier for waitqueue_active | ||
349 | */ | ||
347 | if (atomic_dec_return(&fs_info->nr_async_bios) < limit && | 350 | if (atomic_dec_return(&fs_info->nr_async_bios) < limit && |
348 | waitqueue_active(&fs_info->async_submit_wait)) | 351 | waitqueue_active(&fs_info->async_submit_wait)) |
349 | wake_up(&fs_info->async_submit_wait); | 352 | wake_up(&fs_info->async_submit_wait); |