6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success
Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Dan McDonald <danmcd@omniti.com> illumos/illumos-gate@0f92170f1e
This commit is contained in:
parent
ad688e7c0e
commit
1fa7a2b6dd
@ -21,6 +21,7 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
* Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -966,11 +967,12 @@ zfsctl_shares_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp,
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (SET_ERROR(ENOTSUP));
|
||||
}
|
||||
if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0)
|
||||
if ((error = zfs_zget(zfsvfs, zfsvfs->z_shares_dir, &dzp)) == 0) {
|
||||
error = VOP_LOOKUP(ZTOV(dzp), nm, vpp, pnp,
|
||||
flags, rdir, cr, ct, direntflags, realpnp);
|
||||
VN_RELE(ZTOV(dzp));
|
||||
}
|
||||
|
||||
VN_RELE(ZTOV(dzp));
|
||||
ZFS_EXIT(zfsvfs);
|
||||
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user