diff options
author | David Sterba <dsterba@suse.com> | 2018-02-26 18:15:17 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 19:23:09 +0300 |
commit | 093258e6ebaf178bb25da514f0d1f744968cc900 (patch) | |
tree | c9ee01a7d5cc576fbe07f0df782088ce504791d1 /fs/btrfs/delayed-inode.c | |
parent | 3d3a2e610ea5e7c6d4f9481ecce5d8e2d8317843 (diff) | |
download | linux-093258e6ebaf178bb25da514f0d1f744968cc900.tar.xz |
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/delayed-inode.c')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index a8d492dbd3e7..fe6caa7e698b 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -460,13 +460,10 @@ static void finish_one_item(struct btrfs_delayed_root *delayed_root) { int seq = atomic_inc_return(&delayed_root->items_seq); - /* - * atomic_dec_return implies a barrier for waitqueue_active - */ + /* atomic_dec_return implies a barrier */ if ((atomic_dec_return(&delayed_root->items) < - BTRFS_DELAYED_BACKGROUND || seq % BTRFS_DELAYED_BATCH == 0) && - waitqueue_active(&delayed_root->wait)) - wake_up(&delayed_root->wait); + BTRFS_DELAYED_BACKGROUND || seq % BTRFS_DELAYED_BATCH == 0)) + cond_wake_up_nomb(&delayed_root->wait); } static void __btrfs_remove_delayed_item(struct btrfs_delayed_item *delayed_item) |