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:
@@ -11081,12 +11081,7 @@ int btrfs_trim_fs(struct btrfs_fs_info *fs_info, struct fstrim_range *range)
|
||||
void btrfs_end_write_no_snapshotting(struct btrfs_root *root)
|
||||
{
|
||||
percpu_counter_dec(&root->subv_writers->counter);
|
||||
/*
|
||||
* Make sure counter is updated before we wake up waiters.
|
||||
*/
|
||||
smp_mb();
|
||||
if (waitqueue_active(&root->subv_writers->wait))
|
||||
wake_up(&root->subv_writers->wait);
|
||||
cond_wake_up(&root->subv_writers->wait);
|
||||
}
|
||||
|
||||
int btrfs_start_write_no_snapshotting(struct btrfs_root *root)
|
||||
|
||||
Reference in New Issue
Block a user