diff options
author | Chris Mason <clm@fb.com> | 2015-10-13 02:24:40 +0300 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-13 02:24:40 +0300 |
commit | 6db4a7335dd701a0e20275440ee057d3db2a7ae3 (patch) | |
tree | c0734d7411806ef91bfeb615bf528ffb349938fe /fs/btrfs/inode.c | |
parent | 62fb50ab7c903357c92cef2f7677235b92ac575f (diff) | |
parent | ee86395458072760d62e66aad10a5e9e8902b8cf (diff) | |
download | linux-6db4a7335dd701a0e20275440ee057d3db2a7ae3.tar.xz |
Merge branch 'fix/waitqueue-barriers' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.4
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 25eb814c302f..208db4e835f0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -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)) |