diff options
author | avg <avg@FreeBSD.org> | 2016-05-17 08:31:46 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2016-05-17 08:31:46 +0000 |
commit | cc2f72017246c147643746cd741cc777f317bb5c (patch) | |
tree | d0192dda5490e76fed126e1ada05a14a6e2ee7ac /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | |
parent | 5e400ac62bbbddb9f52b3434f0527b15426bf142 (diff) | |
download | FreeBSD-src-cc2f72017246c147643746cd741cc777f317bb5c.zip FreeBSD-src-cc2f72017246c147643746cd741cc777f317bb5c.tar.gz |
MFC r298106: zfs_rezget: z_vnode can not be NULL if zp is valid
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c index 964b453..431a05d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c @@ -1341,7 +1341,7 @@ zfs_rezget(znode_t *zp) * recycled when the last vnode reference is dropped. */ vp = ZTOV(zp); - if (vp != NULL && vp->v_type != IFTOVT((mode_t)zp->z_mode)) { + if (vp->v_type != IFTOVT((mode_t)zp->z_mode)) { zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (EIO); @@ -1349,11 +1349,9 @@ zfs_rezget(znode_t *zp) zp->z_unlinked = (zp->z_links == 0); zp->z_blksz = doi.doi_data_block_size; - if (vp != NULL) { - vn_pages_remove(vp, 0, 0); - if (zp->z_size != size) - vnode_pager_setsize(vp, zp->z_size); - } + vn_pages_remove(vp, 0, 0); + if (zp->z_size != size) + vnode_pager_setsize(vp, zp->z_size); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); |