diff options
author | mav <mav@FreeBSD.org> | 2015-10-03 08:06:29 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-03 08:06:29 +0000 |
commit | b0c8d241201673fef89acbd2f789ed94970ffad1 (patch) | |
tree | 3b1c4b2137a3a288feb63c1a64576b3a15c99161 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c | |
parent | 06f0381373a057e374065afaf5b60185aa48c6b4 (diff) | |
download | FreeBSD-src-b0c8d241201673fef89acbd2f789ed94970ffad1.zip FreeBSD-src-b0c8d241201673fef89acbd2f789ed94970ffad1.tar.gz |
MFC r286710:
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@0f92170f1ec2737ee5a0e51b5f74093904811452
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c index e6c627c..22bbfb2 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c @@ -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. */ /* @@ -1149,10 +1150,11 @@ zfsctl_shares_lookup(ap) 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), vpp, cnp); + VN_RELE(ZTOV(dzp)); + } - VN_RELE(ZTOV(dzp)); ZFS_EXIT(zfsvfs); return (error); |