Cannot do MALLOC with M_WAITOK while holding ACQUIRE_LOCK

Obtained from:	Ethan Solomita <ethan@geocast.com>
This commit is contained in:
Kirk McKusick 2000-09-07 23:02:55 +00:00
parent 0deb7ddcd4
commit 52a3bfa2e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65595

View File

@ -2837,11 +2837,11 @@ softdep_disk_io_initiation(bp)
/*
* Replace up-to-date version with safe version.
*/
MALLOC(indirdep->ir_saveddata, caddr_t, bp->b_bcount,
M_INDIRDEP, M_WAITOK);
ACQUIRE_LOCK(&lk);
indirdep->ir_state &= ~ATTACHED;
indirdep->ir_state |= UNDONE;
MALLOC(indirdep->ir_saveddata, caddr_t, bp->b_bcount,
M_INDIRDEP, M_WAITOK);
bcopy(bp->b_data, indirdep->ir_saveddata, bp->b_bcount);
bcopy(indirdep->ir_savebp->b_data, bp->b_data,
bp->b_bcount);