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:
David Sterba
2015-02-16 19:36:47 +01:00
parent 33a9eca7e4
commit a83342aa0c
5 changed files with 16 additions and 2 deletions

View File

@@ -839,6 +839,9 @@ static void free_workspace(int type, struct list_head *workspace)
btrfs_compress_op[idx]->free_workspace(workspace);
atomic_dec(alloc_workspace);
wake:
/*
* Make sure counter is updated before we wake up waiters.
*/
smp_mb();
if (waitqueue_active(workspace_wait))
wake_up(workspace_wait);