Run zvol_create_minors() only if in non-error case

This commit is contained in:
mm 2013-03-19 22:27:15 +00:00
parent e3be864a3f
commit 18a8e19d91

View File

@ -1289,11 +1289,13 @@ dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t *errors)
#ifdef __FreeBSD__
#ifdef _KERNEL
if (error == 0) {
for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL;
pair = nvlist_next_nvpair(snaps, pair)) {
char *snapname = nvpair_name(pair);
zvol_create_minors(snapname);
}
}
#endif
#endif
return (error);