softdep_unmount: assert that no dandling dependencies are left

Reviewed by:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D29178
This commit is contained in:
Konstantin Belousov 2021-03-06 11:52:10 +02:00
parent 7a8d4b4da6
commit 0b3948e73b

View File

@ -2825,6 +2825,13 @@ softdep_unmount(mp)
FREE_GBLLOCK(&lk);
ump->um_softdep = NULL;
KASSERT(ums->sd_on_journal == 0,
("ump %p ums %p on_journal %d", ump, ums, ums->sd_on_journal));
KASSERT(ums->sd_on_worklist == 0,
("ump %p ums %p on_worklist %d", ump, ums, ums->sd_on_worklist));
KASSERT(ums->sd_deps == 0,
("ump %p ums %p deps %d", ump, ums, ums->sd_deps));
/*
* Free up our resources.
*/