From 2dcef8ae2ba607af0ecf73abc909344f5d23a167 Mon Sep 17 00:00:00 2001 From: pjd Date: Sun, 13 Sep 2009 10:29:51 +0000 Subject: [PATCH] Extend scope of the z_teardown_lock lock for consistency and "just in case". MFC after: 3 days --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 6bea810a0ec2..175e63e034c1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -1185,8 +1185,6 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp, } } - ZFS_EXIT(zfsvfs); - /* Translate errors and add SAVENAME when needed. */ if (cnp->cn_flags & ISLASTCN) { switch (nameiop) { @@ -1217,6 +1215,7 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp, if (error != 0) { VN_RELE(*vpp); *vpp = NULL; + ZFS_EXIT(zfsvfs); return (error); } } @@ -1238,6 +1237,8 @@ zfs_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, struct componentname *cnp, } #endif + ZFS_EXIT(zfsvfs); + return (error); }