svn commit: r298106 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Sat Apr 16 07:41:58 UTC 2016
Author: avg
Date: Sat Apr 16 07:41:56 2016
New Revision: 298106
URL: https://svnweb.freebsd.org/changeset/base/298106
Log:
zfs_rezget: z_vnode can not be NULL if zp is valid
MFC after: 3 weeks
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Apr 16 07:35:53 2016 (r298105)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Apr 16 07:41:56 2016 (r298106)
@@ -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);
More information about the svn-src-head
mailing list