Author: mav
Date: Thu Aug 13 00:10:36 2015
New Revision: 286710
URL: https://svnweb.freebsd.org/changeset/base/286710

Log:
  MFV 286709:
  6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success
  
  Reviewed by: Gordon Ross <g...@nexenta.com>
  Reviewed by: Matthew Ahrens <mahr...@delphix.com>
  Reviewed by: George Wilson <george.wil...@delphix.com>
  Approved by: Robert Mustacchi <r...@joyent.com>
  Author: Dan McDonald <dan...@omniti.com>
  
  illumos/illumos-gate@0f92170f1ec2737ee5a0e51b5f74093904811452

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c    Thu Aug 
13 00:07:23 2015        (r286709)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c    Thu Aug 
13 00:10:36 2015        (r286710)
@@ -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);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to