mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
Linux: use filemap_range_has_page()
As of the 4.13 kernel filemap_range_has_page() can be used to check if there is a page mapped in a given file range. When available this interface should be used which eliminates the need for the zp->z_is_mapped boolean. Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #14493
This commit is contained in:
@@ -498,7 +498,9 @@ zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id,
|
||||
zp->z_atime_dirty = B_FALSE;
|
||||
zp->z_zn_prefetch = B_FALSE;
|
||||
zp->z_is_sa = B_FALSE;
|
||||
#if !defined(HAVE_FILEMAP_RANGE_HAS_PAGE)
|
||||
zp->z_is_mapped = B_FALSE;
|
||||
#endif
|
||||
zp->z_is_ctldir = B_TRUE;
|
||||
zp->z_sa_hdl = NULL;
|
||||
zp->z_blksz = 0;
|
||||
|
||||
Reference in New Issue
Block a user