Run zvol_create_minors() only if in non-error case
This commit is contained in:
parent
e56718d734
commit
a0abc0d302
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/libzfs_core/; revision=248538
@ -1289,10 +1289,12 @@ dsl_dataset_snapshot(nvlist_t *snaps, nvlist_t *props, nvlist_t *errors)
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#ifdef _KERNEL
|
||||
for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL;
|
||||
pair = nvlist_next_nvpair(snaps, pair)) {
|
||||
char *snapname = nvpair_name(pair);
|
||||
zvol_create_minors(snapname);
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user