]> granicus.if.org Git - zfs/commitdiff
Illumos 6280 - libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED
authorMarcel Telka <marcel.telka@nexenta.com>
Sun, 10 Jan 2016 22:35:29 +0000 (23:35 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 12 Jan 2016 22:27:50 +0000 (14:27 -0800)
6280 libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>

References:
  https://www.illumos.org/issues/6280
  https://github.com/illumos/illumos-gate/commit/d1672ef

Ported-by: kernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
lib/libzfs/libzfs_mount.c

index c01ec105e4a42746a6eeb13c1a8658c90d98bc34..41ab861314378ef23a9b6989553c10896e46c299 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
@@ -857,7 +858,7 @@ unshare_one(libzfs_handle_t *hdl, const char *name, const char *mountpoint,
        /* make sure libshare initialized */
        if ((err = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) {
                free(mntpt);    /* don't need the copy anymore */
-               return (zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
+               return (zfs_error_fmt(hdl, EZFS_UNSHARENFSFAILED,
                    dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"),
                    name, sa_errorstr(err)));
        }