- In some cases bp->b_vp can be NULL in brelse, don't try to lock the

interlock in that case.

Found by:	alc
This commit is contained in:
Jeff Roberson 2003-08-31 00:06:07 +00:00
parent 3562af1215
commit b5c61abd82
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119597

View File

@ -1253,10 +1253,12 @@ brelse(struct buf * bp)
* cannot be set while we hold the buf lock, it can only be
* cleared if it is already pending.
*/
VI_LOCK(bp->b_vp);
if (!(bp->b_vflags & BV_BKGRDINPROG))
bp->b_flags |= B_RELBUF;
VI_UNLOCK(bp->b_vp);
if (bp->b_vp) {
VI_LOCK(bp->b_vp);
if (!(bp->b_vflags & BV_BKGRDINPROG))
bp->b_flags |= B_RELBUF;
VI_UNLOCK(bp->b_vp);
}
}
/*