The called function name is self explanatory.
Signed-off-by: David Sterba <dsterba@suse.com>
logical_start, csum, csum_expected, mirror_num);
}
-static inline bool btrfs_page_exists_in_range(struct inode *inode,
- loff_t start, loff_t end)
-{
- return filemap_range_has_page(inode->i_mapping, start, end);
-}
-
#endif
if ((!ordered ||
(ordered->file_offset + ordered->len <= lockstart ||
ordered->file_offset > lockend)) &&
- !btrfs_page_exists_in_range(inode, lockstart, lockend)) {
+ !filemap_range_has_page(inode->i_mapping,
+ lockstart, lockend)) {
if (ordered)
btrfs_put_ordered_extent(ordered);
break;
* get stale data.
*/
if (!ordered &&
- (!writing ||
- !btrfs_page_exists_in_range(inode, lockstart, lockend)))
+ (!writing || !filemap_range_has_page(inode->i_mapping,
+ lockstart, lockend)))
break;
unlock_extent_cached(&BTRFS_I(inode)->io_tree, lockstart, lockend,