diff options
author | Ryan Moeller <[email protected]> | 2020-11-04 21:47:14 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-12-23 14:34:59 -0800 |
commit | 86e74dc162bd41c61b5876ea15c17da3e516ef39 (patch) | |
tree | f250ec16efaa05db06c4e1537b258262a2606b1c /module | |
parent | b3d723fb0ede3a735a3b97c65898197973b0b8ff (diff) |
Remove redundant oid parameter to update_pages
The oid comes from the znode we are already passing.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matt Macy <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #11176
Diffstat (limited to 'module')
-rw-r--r-- | module/os/freebsd/zfs/zfs_vnops_os.c | 6 | ||||
-rw-r--r-- | module/os/linux/zfs/zfs_vnops_os.c | 7 | ||||
-rw-r--r-- | module/zfs/zfs_vnops.c | 3 |
3 files changed, 7 insertions, 9 deletions
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c index abb96f529..4b07a8a14 100644 --- a/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/module/os/freebsd/zfs/zfs_vnops_os.c @@ -526,7 +526,7 @@ page_unhold(vm_page_t pp) * the page and the dmu buffer. */ void -update_pages(znode_t *zp, int64_t start, int len, objset_t *os, uint64_t oid) +update_pages(znode_t *zp, int64_t start, int len, objset_t *os) { vm_object_t obj; struct sf_buf *sf; @@ -551,8 +551,8 @@ update_pages(znode_t *zp, int64_t start, int len, objset_t *os, uint64_t oid) zfs_vmobject_wunlock_12(obj); va = zfs_map_page(pp, &sf); - (void) dmu_read(os, oid, start+off, nbytes, - va+off, DMU_READ_PREFETCH); + (void) dmu_read(os, zp->z_id, start + off, nbytes, + va + off, DMU_READ_PREFETCH); zfs_unmap_page(sf); zfs_vmobject_wlock_12(obj); diff --git a/module/os/linux/zfs/zfs_vnops_os.c b/module/os/linux/zfs/zfs_vnops_os.c index 2469769bc..b1d6a7b23 100644 --- a/module/os/linux/zfs/zfs_vnops_os.c +++ b/module/os/linux/zfs/zfs_vnops_os.c @@ -321,8 +321,7 @@ zfs_holey(struct inode *ip, int cmd, loff_t *off) * the page and the dmu buffer. */ void -update_pages(znode_t *zp, int64_t start, int len, - objset_t *os, uint64_t oid) +update_pages(znode_t *zp, int64_t start, int len, objset_t *os) { struct inode *ip = ZTOI(zp); struct address_space *mp = ip->i_mapping; @@ -341,8 +340,8 @@ update_pages(znode_t *zp, int64_t start, int len, flush_dcache_page(pp); pb = kmap(pp); - (void) dmu_read(os, oid, start+off, nbytes, pb+off, - DMU_READ_PREFETCH); + (void) dmu_read(os, zp->z_id, start + off, nbytes, + pb + off, DMU_READ_PREFETCH); kunmap(pp); if (mapping_writably_mapped(mp)) diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index e478f5634..4cc01753e 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -489,8 +489,7 @@ zfs_write(znode_t *zp, uio_t *uio, int ioflag, cred_t *cr) } if (tx_bytes && zn_has_cached_data(zp) && !(ioflag & O_DIRECT)) { - update_pages(zp, woff, - tx_bytes, zfsvfs->z_os, zp->z_id); + update_pages(zp, woff, tx_bytes, zfsvfs->z_os); } /* |