]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix unable to export zpool without nfs-utils
authorChunwei Chen <tuxoko@gmail.com>
Fri, 16 Sep 2022 20:43:26 +0000 (13:43 -0700)
committerGitHub <noreply@github.com>
Fri, 16 Sep 2022 20:43:26 +0000 (13:43 -0700)
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 <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #13534
Closes #13800

lib/libshare/os/linux/nfs.c

index 0d63c989d3420909401ea775781442ef8cb8cae9..c27e5564c1e18ff9b040a5a97f4740cea59198c0 100644 (file)
@@ -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,