From cac3558da3e62fb14539ecf073d570aa4c16a75a Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Sat, 4 Oct 2003 15:57:05 +0000 Subject: [PATCH] - The VI assert in getdirtybuf() is only valid if we're not on a VCHR vnode. VCHR vnodes don't do background writes. Reported by: kan --- sys/ufs/ffs/ffs_softdep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 40081efab468..375968c04e9b 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -5839,7 +5839,10 @@ getdirtybuf(bpp, mtx, waitfor) * The mtx argument must be bp->b_vp's mutex in * this case. */ - ASSERT_VI_LOCKED(bp->b_vp, "getdirtybuf"); +#ifdef DEBUG_VFS_LOCKS + if (bp->b_vp->v_type != VCHR) + ASSERT_VI_LOCKED(bp->b_vp, "getdirtybuf"); +#endif bp->b_vflags |= BV_BKGRDWAIT; interlocked_sleep(&lk, SLEEP, &bp->b_xflags, mtx, PRIBIO, "getbuf", 0);