From 1b6f3368dd5b416753178da06cb19c32798671e6 Mon Sep 17 00:00:00 2001 From: Chunwei Chen Date: Fri, 16 Sep 2022 13:43:26 -0700 Subject: [PATCH] Fix unable to export zpool without nfs-utils Don't return error in nfs_disable_share when nfs is not available, since it wouldn't have been able to share in the first place. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #13534 Closes #13800 --- lib/libshare/os/linux/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libshare/os/linux/nfs.c b/lib/libshare/os/linux/nfs.c index 0d63c989d..c27e5564c 100644 --- a/lib/libshare/os/linux/nfs.c +++ b/lib/libshare/os/linux/nfs.c @@ -449,7 +449,7 @@ static int nfs_disable_share(sa_share_impl_t impl_share) { if (!nfs_available()) - return (SA_SYSTEM_ERR); + return (SA_OK); return (nfs_toggle_share( ZFS_EXPORTS_LOCK, ZFS_EXPORTS_FILE, ZFS_EXPORTS_DIR, impl_share,