btrfs: Use filemap_range_has_page()
authorMatthew Wilcox <mawilcox@microsoft.com>
Tue, 6 Mar 2018 19:23:16 +0000 (11:23 -0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 30 Mar 2018 23:26:45 +0000 (01:26 +0200)
commit965aab1cfc13dacc3d5ad0d8d8eb4e0a7ea8c1d1
treee537073b08d947fba241a8442082c33beb3e772e
parent4759700a71ab109c67376360e9f00e2fed6b3807
btrfs: Use filemap_range_has_page()

The current implementation of btrfs_page_exists_in_range() gives the
wrong answer if the workingset code has stored a shadow entry in the
page cache.  The filemap_range_has_page() function does not have this
problem, and it's shared code, so use it instead.

eigned-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c