From 772a9659d91e9445e412c7bc5f436765fa2b028d Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Thu, 28 Aug 2003 15:48:15 +0000 Subject: [PATCH] Do not return with vnode interlock held. Reviewed by: rwatson --- sys/kern/vfs_bio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 296c9a68b9d8..77f47cba7257 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -779,6 +779,7 @@ bwrite(struct buf * bp) VI_LOCK(bp->b_vp); if (bp->b_vflags & BV_BKGRDINPROG) { if (bp->b_flags & B_ASYNC) { + VI_UNLOCK(bp->b_vp); splx(s); bdwrite(bp); return (0); @@ -1505,6 +1506,7 @@ bqrelse(struct buf * bp) * the buffer (most importantly: the wired pages * making up its backing store) *now*. */ + VI_UNLOCK(bp->b_vp); mtx_unlock(&bqlock); splx(s); brelse(bp);