diff options
author | David Sterba <dsterba@suse.com> | 2015-02-16 13:36:47 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-10-10 12:40:04 -0400 |
commit | a83342aa0c8f0ca90057d3837ae8d198186e5153 (patch) | |
tree | 723d60098638e0f048ae630399d2f77d0e1a0c9d /fs/btrfs/locking.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/locking.c')
-rw-r--r-- | fs/btrfs/locking.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index d7e6baf1b205..03f8630dbaf2 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c | |||
@@ -280,6 +280,9 @@ void btrfs_tree_unlock(struct extent_buffer *eb) | |||
280 | if (blockers) { | 280 | if (blockers) { |
281 | WARN_ON(atomic_read(&eb->spinning_writers)); | 281 | WARN_ON(atomic_read(&eb->spinning_writers)); |
282 | atomic_dec(&eb->blocking_writers); | 282 | atomic_dec(&eb->blocking_writers); |
283 | /* | ||
284 | * Make sure counter is updated before we wake up waiters. | ||
285 | */ | ||
283 | smp_mb(); | 286 | smp_mb(); |
284 | if (waitqueue_active(&eb->write_lock_wq)) | 287 | if (waitqueue_active(&eb->write_lock_wq)) |
285 | wake_up(&eb->write_lock_wq); | 288 | wake_up(&eb->write_lock_wq); |