btrfs: add comments to barriers before waitqueue_active
Reduce number of undocumented barriers out there. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user