summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-02-26 16:15:17 +0100
committerDavid Sterba <dsterba@suse.com>2018-05-28 18:23:09 +0200
commit093258e6ebaf178bb25da514f0d1f744968cc900 (patch)
treec9ee01a7d5cc576fbe07f0df782088ce504791d1 /fs/btrfs/transaction.c
parent3d3a2e610ea5e7c6d4f9481ecce5d8e2d8317843 (diff)
downloadlinux-093258e6ebaf178bb25da514f0d1f744968cc900.tar.gz
linux-093258e6ebaf178bb25da514f0d1f744968cc900.tar.bz2
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/transaction.c')
-rw-r--r--fs/btrfs/transaction.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index c944b4769e3c..ff841abb756e 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -877,12 +877,7 @@ 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);
+ cond_wake_up(&cur_trans->writer_wait);
btrfs_put_transaction(cur_trans);
if (current->journal_info == trans)