aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/nfs_subs.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>1999-06-26 02:47:16 +0000
committerKirk McKusick <mckusick@FreeBSD.org>1999-06-26 02:47:16 +0000
commit67812eacd74d5841e890b703d4ec2d5a76288830 (patch)
treedaad70481467b7aa233a8f5e919b7eec6d7cc908 /sys/nfsclient/nfs_subs.c
parent5a903f8d735f0cc4a378e9f85fa3ad30a675df06 (diff)
downloadsrc-67812eacd74d5841e890b703d4ec2d5a76288830.tar.gz
src-67812eacd74d5841e890b703d4ec2d5a76288830.zip
Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old semantics. That is, all buffer locking is done with LK_EXCLUSIVE requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will be done in future commits.
Notes
Notes: svn path=/head/; revision=48225
Diffstat (limited to 'sys/nfsclient/nfs_subs.c')
-rw-r--r--sys/nfsclient/nfs_subs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c
index cd771555ae85..554e182c1239 100644
--- a/sys/nfsclient/nfs_subs.c
+++ b/sys/nfsclient/nfs_subs.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
- * $Id: nfs_subs.c,v 1.75 1999/06/05 05:35:00 peter Exp $
+ * $Id: nfs_subs.c,v 1.76 1999/06/23 04:44:12 julian Exp $
*/
/*
@@ -2188,7 +2188,8 @@ loop:
nvp = vp->v_mntvnodes.le_next;
for (bp = TAILQ_FIRST(&vp->v_dirtyblkhd); bp; bp = nbp) {
nbp = TAILQ_NEXT(bp, b_vnbufs);
- if ((bp->b_flags & (B_BUSY | B_DELWRI | B_NEEDCOMMIT))
+ if (BUF_REFCNT(bp) == 0 &&
+ (bp->b_flags & (B_DELWRI | B_NEEDCOMMIT))
== (B_DELWRI | B_NEEDCOMMIT))
bp->b_flags &= ~B_NEEDCOMMIT;
}