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:
@@ -1156,13 +1156,10 @@ static noinline void async_cow_submit(struct btrfs_work *work)
|
||||
nr_pages = (async_cow->end - async_cow->start + PAGE_SIZE) >>
|
||||
PAGE_SHIFT;
|
||||
|
||||
/*
|
||||
* atomic_sub_return implies a barrier for waitqueue_active
|
||||
*/
|
||||
/* atomic_sub_return implies a barrier */
|
||||
if (atomic_sub_return(nr_pages, &fs_info->async_delalloc_pages) <
|
||||
5 * SZ_1M &&
|
||||
waitqueue_active(&fs_info->async_submit_wait))
|
||||
wake_up(&fs_info->async_submit_wait);
|
||||
5 * SZ_1M)
|
||||
cond_wake_up_nomb(&fs_info->async_submit_wait);
|
||||
|
||||
if (async_cow->inode)
|
||||
submit_compressed_extents(async_cow->inode, async_cow);
|
||||
|
Reference in New Issue
Block a user