Stop segfaulting on unmount error case
After interrupting ZTS runs that errored out, I found that "zpool export testpool2" was segfaulting. This seems unnecessary. Reviewed-by: szubersk <szuberskidamian@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes #12804
This commit is contained in:
parent
547df81641
commit
5dc6fc2b73
|
@ -595,9 +595,13 @@ unmount_one(zfs_handle_t *zhp, const char *mountpoint, int flags)
|
|||
default:
|
||||
libzfs_err = EZFS_UMOUNTFAILED;
|
||||
}
|
||||
if (zhp) {
|
||||
return (zfs_error_fmt(zhp->zfs_hdl, libzfs_err,
|
||||
dgettext(TEXT_DOMAIN, "cannot unmount '%s'"),
|
||||
mountpoint));
|
||||
} else {
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue