diff options
Diffstat (limited to 'lib/libzfs/common/libzfs_dataset.c')
| -rw-r--r-- | lib/libzfs/common/libzfs_dataset.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libzfs/common/libzfs_dataset.c b/lib/libzfs/common/libzfs_dataset.c index db7111c21c5f..cc2603cf890b 100644 --- a/lib/libzfs/common/libzfs_dataset.c +++ b/lib/libzfs/common/libzfs_dataset.c @@ -3058,7 +3058,8 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type, /* * Destroys the given dataset. The caller must make sure that the filesystem - * isn't mounted, and that there are no active dependents. + * isn't mounted, and that there are no active dependents. If the file system + * does not exist this function does nothing. */ int zfs_destroy(zfs_handle_t *zhp, boolean_t defer) @@ -3074,7 +3075,8 @@ zfs_destroy(zfs_handle_t *zhp, boolean_t defer) } zc.zc_defer_destroy = defer; - if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY, &zc) != 0) { + if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_DESTROY, &zc) != 0 && + errno != ENOENT) { return (zfs_standard_error_fmt(zhp->zfs_hdl, errno, dgettext(TEXT_DOMAIN, "cannot destroy '%s'"), zhp->zfs_name)); |
