mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Fix a mismerge in r260183 which prevents snapshot zvol devices being
removed and re-instate the fix in r242862. Reported by: Leon Dang <ldang nahannisys com>, smh MFC after: 3 days
This commit is contained in:
parent
0f4a03663b
commit
0b66c7c514
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272324
@ -3550,7 +3550,12 @@ zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl)
|
|||||||
|
|
||||||
for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL;
|
for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL;
|
||||||
pair = nvlist_next_nvpair(snaps, pair)) {
|
pair = nvlist_next_nvpair(snaps, pair)) {
|
||||||
(void) zfs_unmount_snap(nvpair_name(pair));
|
const char *name = nvpair_name(pair);
|
||||||
|
|
||||||
|
(void) zfs_unmount_snap(name);
|
||||||
|
#if defined(__FreeBSD__)
|
||||||
|
(void) zvol_remove_minor(name);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl));
|
return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl));
|
||||||
@ -3644,7 +3649,6 @@ zfs_ioc_destroy_bookmarks(const char *poolname, nvlist_t *innvl,
|
|||||||
if (strncmp(name, poolname, poollen) != 0 ||
|
if (strncmp(name, poolname, poollen) != 0 ||
|
||||||
(name[poollen] != '/' && name[poollen] != '#'))
|
(name[poollen] != '/' && name[poollen] != '#'))
|
||||||
return (SET_ERROR(EXDEV));
|
return (SET_ERROR(EXDEV));
|
||||||
(void) zvol_remove_minor(name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
error = dsl_bookmark_destroy(innvl, outnvl);
|
error = dsl_bookmark_destroy(innvl, outnvl);
|
||||||
|
Loading…
Reference in New Issue
Block a user