btrfs: replace waitqueue_actvie with cond_wake_up

Use the wrappers and reduce the amount of low-level details about the
waitqueue management.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2018-02-26 16:15:17 +01:00
parent 3d3a2e610e
commit 093258e6eb
9 changed files with 40 additions and 91 deletions

View file

@ -990,12 +990,7 @@ static void __free_workspace(int type, struct list_head *workspace,
btrfs_compress_op[idx]->free_workspace(workspace);
atomic_dec(total_ws);
wake:
/*
* Make sure counter is updated before we wake up waiters.
*/
smp_mb();
if (waitqueue_active(ws_wait))
wake_up(ws_wait);
cond_wake_up(ws_wait);
}
static void free_workspace(int type, struct list_head *ws)