Remove redundant oid parameter to update_pages

The oid comes from the znode we are already passing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Matt Macy <mmacy@FreeBSD.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11176
This commit is contained in:
Ryan Moeller 2020-11-04 21:47:14 +00:00 committed by Brian Behlendorf
parent b3d723fb0e
commit 86e74dc162
4 changed files with 8 additions and 10 deletions

View File

@ -34,6 +34,6 @@ extern int zfs_setsecattr(znode_t *zp, vsecattr_t *vsecp, int flag, cred_t *cr);
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 *);
#endif

View File

@ -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);

View File

@ -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))

View File

@ -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);
}
/*