summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2008-09-07 07:55:12 +0000
committerpjd <pjd@FreeBSD.org>2008-09-07 07:55:12 +0000
commit5d3f53e84925fd84075c5fdf8ac8fdce89b13a94 (patch)
treebe9233e63efd48bc4645b02e09df96f1a5643330 /sys/cddl
parentf900007096985a74c9532dd77dd07e68e926eb85 (diff)
downloadFreeBSD-src-5d3f53e84925fd84075c5fdf8ac8fdce89b13a94.zip
FreeBSD-src-5d3f53e84925fd84075c5fdf8ac8fdce89b13a94.tar.gz
Initialize vp, so we don't call VOP_UNLOCK() with NULL vnode pointer.
Confirmed by: marcus
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c3
1 files changed, 2 insertions, 1 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 800bc53..bab8496 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);
}
OpenPOWER on IntegriCloud