- Assert that the bufobj matches in flushbuflists. I still haven't gotten

to root cause on exactly how this happens.
 - If the assert is disabled, we presently try to handle this case, but the
   BUF_UNLOCK was missing.  Thus, if this condition ever hit we would leak
   a buf lock.

Many thanks to Peter Holm for all his help in finding this bug.  He really
put more effort into it than I did.
This commit is contained in:
jeff 2005-04-06 06:49:46 +00:00
parent 3e09e80261
commit 60d07eec30

View File

@ -1040,7 +1040,10 @@ flushbuflist(bufv, flags, bo, slpflag, slptimeo)
BO_LOCK(bo);
return (error != ENOLCK ? error : EAGAIN);
}
KASSERT(bp->b_bufobj == bo,
("wrong b_bufobj %p should be %p", bp->b_bufobj, bo));
if (bp->b_bufobj != bo) { /* XXX: necessary ? */
BUF_UNLOCK(bp);
BO_LOCK(bo);
return (EAGAIN);
}