mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Additional KASSERTs to ensure the consistency of the soft updates
indirdep structure. No functional change. Tested by: Peter Holm (as part of a larger patch) Sponsored by: Netflix
This commit is contained in:
parent
868b51f234
commit
98b6844690
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358085
|
@ -8224,8 +8224,13 @@ indir_trunc(freework, dbn, lbn)
|
|||
* If we're goingaway, free the indirdep. Otherwise it will
|
||||
* linger until the write completes.
|
||||
*/
|
||||
if (goingaway)
|
||||
if (goingaway) {
|
||||
KASSERT(indirdep->ir_savebp == bp,
|
||||
("indir_trunc: losing ir_savebp %p",
|
||||
indirdep->ir_savebp));
|
||||
indirdep->ir_savebp = NULL;
|
||||
free_indirdep(indirdep);
|
||||
}
|
||||
}
|
||||
FREE_LOCK(ump);
|
||||
/* Initialize pointers depending on block size. */
|
||||
|
@ -10739,6 +10744,8 @@ free_indirdep(indirdep)
|
|||
("free_indirdep: %p still on newblk list.", indirdep));
|
||||
KASSERT(indirdep->ir_saveddata == NULL,
|
||||
("free_indirdep: %p still has saved data.", indirdep));
|
||||
KASSERT(indirdep->ir_savebp == NULL,
|
||||
("free_indirdep: %p still has savebp buffer.", indirdep));
|
||||
if (indirdep->ir_state & ONWORKLIST)
|
||||
WORKLIST_REMOVE(&indirdep->ir_list);
|
||||
WORKITEM_FREE(indirdep, D_INDIRDEP);
|
||||
|
|
Loading…
Reference in a new issue