summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-02-16 19:41:40 +0100
committerDavid Sterba <dsterba@suse.com>2015-10-10 18:42:00 +0200
commitee86395458072760d62e66aad10a5e9e8902b8cf (patch)
treeb3293bde46967a886b5d066028c5eceebd810dac /fs/btrfs/disk-io.c
parentbtrfs: remove extra barrier before waitqueue_active (diff)
downloadlinux-ee86395458072760d62e66aad10a5e9e8902b8cf.tar.xz
linux-ee86395458072760d62e66aad10a5e9e8902b8cf.zip
btrfs: comment the rest of implicit barriers before waitqueue_active
There are atomic operations that imply the barrier for waitqueue_active mixed in an if-condition. Signed-off-by: David Sterba <dsterba@suse.com>
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 295795aebe0b..379526ffd84d 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -802,6 +802,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);