mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
btrfs: comment the rest of implicit barriers before waitqueue_active
There are atomic operations that imply the barrier for waitqueue_active mixed in an if-condition. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
779adf0f64
commit
ee86395458
5 changed files with 22 additions and 0 deletions
|
@ -1096,6 +1096,9 @@ static noinline void async_cow_submit(struct btrfs_work *work)
|
|||
nr_pages = (async_cow->end - async_cow->start + PAGE_CACHE_SIZE) >>
|
||||
PAGE_CACHE_SHIFT;
|
||||
|
||||
/*
|
||||
* atomic_sub_return implies a barrier for waitqueue_active
|
||||
*/
|
||||
if (atomic_sub_return(nr_pages, &root->fs_info->async_delalloc_pages) <
|
||||
5 * 1024 * 1024 &&
|
||||
waitqueue_active(&root->fs_info->async_submit_wait))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue