Author: mav
Date: Sat Oct  3 08:06:29 2015
New Revision: 288573
URL: https://svnweb.freebsd.org/changeset/base/288573

Log:
  MFC r286710:
  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:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c       
Sat Oct  3 08:05:33 2015        (r288572)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c       
Sat Oct  3 08:06:29 2015        (r288573)
@@ -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-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to