From 1b856fa4912c9cf1e6b74000d7e2e9e304424b4c Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Sun, 7 Sep 2008 07:55:12 +0000 Subject: [PATCH] Initialize vp, so we don't call VOP_UNLOCK() with NULL vnode pointer. Confirmed by: marcus --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 800bc53bb8f5..bab84960f50d 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 @@ -628,7 +628,8 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_num, znode_t **zpp) zfs_znode_dmu_init(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); *zpp = zp; - VOP_UNLOCK(vp, 0); + if ((vp = ZTOV(zp)) != NULL) + VOP_UNLOCK(vp, 0); return (0); }