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 <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #13534
Closes #13800
This commit is contained in:
Chunwei Chen 2022-09-16 13:43:26 -07:00 committed by GitHub
parent 768eacedef
commit 1b6f3368dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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,