Grab Giant in bufdonebio() since drivers may not hold it.

This only protects the "struct buf" consumers (ie: DEV_STRATEGY()),
but does not protect BIO_STRATEGY() users.
This commit is contained in:
Poul-Henning Kamp 2003-08-02 09:45:10 +00:00
parent a99de58f92
commit 4bfd22f25e

View File

@ -3029,7 +3029,11 @@ bufwait(register struct buf * bp)
void
bufdonebio(struct bio *bp)
{
/* Device drivers may or may not hold giant, hold it here. */
mtx_lock(&Giant);
bufdone(bp->bio_caller2);
mtx_unlock(&Giant);
}
/*