diff options
author | David Sterba <dsterba@suse.com> | 2015-02-16 21:41:40 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-10-10 19:42:00 +0300 |
commit | ee86395458072760d62e66aad10a5e9e8902b8cf (patch) | |
tree | b3293bde46967a886b5d066028c5eceebd810dac /fs/btrfs/delayed-inode.c | |
parent | 779adf0f647651f5a45eeee3442c881300ce989e (diff) | |
download | linux-ee86395458072760d62e66aad10a5e9e8902b8cf.tar.xz |
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/delayed-inode.c')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index a2ae42720a6a..e0941fbb913c 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -463,6 +463,10 @@ static int __btrfs_add_delayed_deletion_item(struct btrfs_delayed_node *node, static void finish_one_item(struct btrfs_delayed_root *delayed_root) { int seq = atomic_inc_return(&delayed_root->items_seq); + + /* + * atomic_dec_return implies a barrier for waitqueue_active + */ if ((atomic_dec_return(&delayed_root->items) < BTRFS_DELAYED_BACKGROUND || seq % BTRFS_DELAYED_BATCH == 0) && waitqueue_active(&delayed_root->wait)) |