summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorDavid Sterba2018-02-26 16:15:17 +0100
committerDavid Sterba2018-05-28 18:23:09 +0200
commit093258e6ebaf178bb25da514f0d1f744968cc900 (patch)
treec9ee01a7d5cc576fbe07f0df782088ce504791d1 /fs/btrfs/compression.c
parentbtrfs: add barriers to btrfs_sync_log before log_commit_wait wakeups (diff)
downloadkernel-qcow2-linux-093258e6ebaf178bb25da514f0d1f744968cc900.tar.gz
kernel-qcow2-linux-093258e6ebaf178bb25da514f0d1f744968cc900.tar.xz
kernel-qcow2-linux-093258e6ebaf178bb25da514f0d1f744968cc900.zip
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>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 1061575a7d25..d3e447b45bf7 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -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)