diff options
author | David Sterba <dsterba@suse.com> | 2015-02-16 19:36:47 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-10-10 18:40:04 +0200 |
commit | a83342aa0c8f0ca90057d3837ae8d198186e5153 (patch) | |
tree | 723d60098638e0f048ae630399d2f77d0e1a0c9d /fs/btrfs/transaction.c | |
parent | 33a9eca7e4a4c2c17aebbb11f0e506a48ebc30c9 (diff) |
btrfs: add comments to barriers before waitqueue_active
Reduce number of undocumented barriers out there.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index e8e5b5a10719..3fd70f797b7d 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -861,6 +861,9 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, atomic_dec(&cur_trans->num_writers); extwriter_counter_dec(cur_trans, trans->type); + /* + * Make sure counter is updated before we wake up waiters. + */ smp_mb(); if (waitqueue_active(&cur_trans->writer_wait)) wake_up(&cur_trans->writer_wait); |