aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-11-04 21:47:14 +0000
committerBrian Behlendorf <[email protected]>2020-11-10 10:54:30 -0800
commit8a9634e2f36528aa47096ed09cd849a08cb23fc3 (patch)
treec6c4f91ddffc01a76d186ad85917e30eefb34add
parenteec6646ea9126d0f3c367e1298e5272b72cda8a4 (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
-rw-r--r--include/sys/zfs_vnops.h2
-rw-r--r--module/os/freebsd/zfs/zfs_vnops_os.c6
-rw-r--r--module/os/linux/zfs/zfs_vnops_os.c7
-rw-r--r--module/zfs/zfs_vnops.c3
4 files changed, 8 insertions, 10 deletions
diff --git a/include/sys/zfs_vnops.h b/include/sys/zfs_vnops.h
index 5aaa64b34..6bf077b4b 100644
--- a/include/sys/zfs_vnops.h
+++ b/include/sys/zfs_vnops.h
@@ -37,7 +37,7 @@ extern int zfs_setsecattr(znode_t *, vsecattr_t *, int, cred_t *);
extern int mappedread(znode_t *, int, uio_t *);
extern int mappedread_sf(znode_t *, int, uio_t *);
-extern void update_pages(znode_t *, int64_t, int, objset_t *, uint64_t);
+extern void update_pages(znode_t *, int64_t, int, objset_t *);
/*
* Platform code that asynchronously drops zp's inode / vnode_t.
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c
index 484ab3d64..7145576df 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -465,7 +465,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;
@@ -490,8 +490,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 056b8900a..8e5208000 100644
--- a/module/os/linux/zfs/zfs_vnops_os.c
+++ b/module/os/linux/zfs/zfs_vnops_os.c
@@ -249,8 +249,7 @@ zfs_close(struct inode *ip, int flag, cred_t *cr)
* 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;
@@ -269,8 +268,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 b1ae6b8c0..fc635e7c0 100644
--- a/module/zfs/zfs_vnops.c
+++ b/module/zfs/zfs_vnops.c
@@ -581,8 +581,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);
}
/*