summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-03-28 12:30:12 +0000
committerattilio <attilio@FreeBSD.org>2008-03-28 12:30:12 +0000
commit7e107a0c8ce6820c1a2604de4575a1551b907341 (patch)
tree9d06a4e3f60083aa0a6dd748b98e5d47ee052b37 /sys/kern/vfs_subr.c
parent3d7f9d1b14e3b0a60532dcf7644a09862d4af9ed (diff)
downloadFreeBSD-src-7e107a0c8ce6820c1a2604de4575a1551b907341.zip
FreeBSD-src-7e107a0c8ce6820c1a2604de4575a1551b907341.tar.gz
b_waiters cannot be adequately protected by the interlock because it is
dropped after the call to lockmgr() so just revert this approach using something similar to the precedent one: BUF_LOCKWAITERS() just checks if there are waiters (not the actual number of them) and it is based on newly introduced lockmgr_waiters() which returns if the lockmgr has waiters or not. The name has been choosen differently by old lockwaiters() in order to not confuse them. KPI results enriched by this commit so __FreeBSD_version bumping and manpage update will be happening soon. 'struct buf' also changes, so kernel ABI is disturbed. Bug found by: jeff Approved by: jeff, kib
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index b3bd6f6..84de803 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1527,12 +1527,11 @@ bgetvp(struct vnode *vp, struct buf *bp)
/*
* Disassociate a buffer from a vnode.
*/
-int
+void
brelvp(struct buf *bp)
{
struct bufobj *bo;
struct vnode *vp;
- int waiters;
CTR3(KTR_BUF, "brelvp(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
KASSERT(bp->b_vp != NULL, ("brelvp: NULL"));
@@ -1557,11 +1556,8 @@ brelvp(struct buf *bp)
bp->b_flags &= ~B_NEEDSGIANT;
bp->b_vp = NULL;
bp->b_bufobj = NULL;
- waiters = bp->b_waiters;
BO_UNLOCK(bo);
vdrop(vp);
-
- return (waiters);
}
/*
OpenPOWER on IntegriCloud