aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ztest
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/ztest')
-rw-r--r--cmd/ztest/ztest.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 8d5ee0bad..3b504e791 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -3499,9 +3499,12 @@ ztest_objset_destroy_cb(const char *name, void *arg)
* Destroy the dataset.
*/
if (strchr(name, '@') != NULL) {
- VERIFY0(dsl_destroy_snapshot(name, B_FALSE));
+ VERIFY0(dsl_destroy_snapshot(name, B_TRUE));
} else {
- VERIFY0(dsl_destroy_head(name));
+ error = dsl_destroy_head(name);
+ /* There could be a hold on this dataset */
+ if (error != EBUSY)
+ ASSERT0(error);
}
return (0);
}