svn commit: r286709 - vendor-sys/illumos/dist/uts/common/fs/zfs

Alexander Motin mav at FreeBSD.org
Thu Aug 13 00:07:24 UTC 2015


Author: mav
Date: Thu Aug 13 00:07:23 2015
New Revision: 286709
URL: https://svnweb.freebsd.org/changeset/base/286709

Log:
  6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success
  
  Reviewed by: Gordon Ross <gwr at nexenta.com>
  Reviewed by: Matthew Ahrens <mahrens at delphix.com>
  Reviewed by: George Wilson <george.wilson at delphix.com>
  Approved by: Robert Mustacchi <rm at joyent.com>
  Author: Dan McDonald <danmcd at omniti.com>
  
  illumos/illumos-gate at 0f92170f1ec2737ee5a0e51b5f74093904811452

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c	Wed Aug 12 23:59:17 2015	(r286708)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ctldir.c	Thu Aug 13 00:07:23 2015	(r286709)
@@ -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 
 		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);


More information about the svn-src-vendor mailing list