summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-02-25 03:37:48 +0000
committerjeff <jeff@FreeBSD.org>2003-02-25 03:37:48 +0000
commit9e4c9a6ce908881b1e6f83cbb906a9fce08dd3ab (patch)
treedf5eb5e550ba49b92f45eadaca861cb18128ad5d /sys/kern/vfs_default.c
parent541937cf7373ff6a61c871266ea041503bb02233 (diff)
downloadFreeBSD-src-9e4c9a6ce908881b1e6f83cbb906a9fce08dd3ab.zip
FreeBSD-src-9e4c9a6ce908881b1e6f83cbb906a9fce08dd3ab.tar.gz
- Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.
- Remove the buftimelock mutex and acquire the buf's interlock to protect these fields instead. - Hold the vnode interlock while locking bufs on the clean/dirty queues. This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another BUF_LOCK with a LK_TIMEFAIL to a single lock. Reviewed by: arch, mckusick
Diffstat (limited to 'sys/kern/vfs_default.c')
-rw-r--r--sys/kern/vfs_default.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 5caa568..e5f2342 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -745,7 +745,7 @@ loop2:
if ((bp->b_vflags & BV_SCANNED) != 0)
continue;
bp->b_vflags |= BV_SCANNED;
- if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT))
+ if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL))
continue;
VI_UNLOCK(vp);
if ((bp->b_flags & B_DELWRI) == 0)
OpenPOWER on IntegriCloud