diff options
author | Tomohiro Kusumi <[email protected]> | 2019-06-06 06:18:46 +0900 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-06-05 14:18:46 -0700 |
commit | 1a6889947eadb1602109e2f683041865205e8fa8 (patch) | |
tree | 7d78b2a6f859dbd5b097bf380c7bd473fa42daf9 /module/zfs | |
parent | 2ecc2020ef37f6b3901243a181e8c1a7bf0ad045 (diff) |
Drop objid argument in zfs_znode_alloc() (sync with OpenZFS)
Since zfs_znode_alloc() already takes dmu_buf_t*, taking another
uint64_t argument for objid is redundant. inode's ->i_ino does and
needs to match znode's ->z_id.
zfs_znode_alloc() in FreeBSD and illumos doesn't have this argument
since vnode doesn't have vnode# in VFS (hence ->z_id exists).
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Tomohiro Kusumi <[email protected]>
Closes #8841
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zfs_znode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c index 203a59909..f334caf19 100644 --- a/module/zfs/zfs_znode.c +++ b/module/zfs/zfs_znode.c @@ -515,7 +515,7 @@ zfs_inode_update(znode_t *zp) */ static znode_t * zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, - dmu_object_type_t obj_type, uint64_t obj, sa_handle_t *hdl) + dmu_object_type_t obj_type, sa_handle_t *hdl) { znode_t *zp; struct inode *ip; @@ -596,7 +596,7 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, ZFS_TIME_DECODE(&ip->i_mtime, mtime); ZFS_TIME_DECODE(&ip->i_ctime, ctime); - ip->i_ino = obj; + ip->i_ino = zp->z_id; zfs_inode_update(zp); zfs_inode_set_ops(zfsvfs, ip); @@ -910,8 +910,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr, * not fail retry until sufficient memory has been reclaimed. */ do { - *zpp = zfs_znode_alloc(zfsvfs, db, 0, obj_type, obj, - sa_hdl); + *zpp = zfs_znode_alloc(zfsvfs, db, 0, obj_type, sa_hdl); } while (*zpp == NULL); VERIFY(*zpp != NULL); @@ -1134,7 +1133,7 @@ again: * bonus buffer. */ zp = zfs_znode_alloc(zfsvfs, db, doi.doi_data_block_size, - doi.doi_bonus_type, obj_num, NULL); + doi.doi_bonus_type, NULL); if (zp == NULL) { err = SET_ERROR(ENOENT); } else { |