Skip to content
Permalink
Browse files

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>
  • Loading branch information
mtelka authored and gwr committed Oct 2, 2015
1 parent 42a9df3 commit d1672efb6feac57c42788e27f739dfa3c4f3baf7
Showing with 2 additions and 1 deletion.
  1. +2 −1 usr/src/lib/libzfs/common/libzfs_mount.c
@@ -20,6 +20,7 @@
*/

/*
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014 by Delphix. All rights reserved.
*/
@@ -831,7 +832,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)));
}

0 comments on commit d1672ef

Please sign in to comment.
You can’t perform that action at this time.