From 76b6aacf60d37639f946fe7c18eba405f282e980 Mon Sep 17 00:00:00 2001 From: "Thordur I. Bjornsson" Date: Thu, 25 Jun 2009 15:49:27 +0000 Subject: backout the buf_acquire() does the bremfree() since all callers where doing bremfree() befure calling buf_acquire(). This is causing us headache pinning down a bug that showed up when deraadt@ too cvs to current, and will have to be done anyway as a preperation for backouts. OK deraadt@ --- sys/nfs/nfs_syscalls.c | 3 ++- sys/nfs/nfs_vnops.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sys/nfs') diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index e0f646dfbc8..cdd2d44a55d 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/nfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_syscalls.c,v 1.81 2009/06/06 18:06:22 art Exp $ */ +/* $OpenBSD: nfs_syscalls.c,v 1.82 2009/06/25 15:49:26 thib Exp $ */ /* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */ /* @@ -663,6 +663,7 @@ nfssvc_iod(void *arg) (B_BUSY|B_DELWRI|B_NEEDCOMMIT|B_NOCACHE))!=B_DELWRI) continue; nbp->b_flags |= B_ASYNC; + bremfree(nbp); buf_acquire(nbp); break; } diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 2fe5acffd29..ee879632549 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.114 2009/06/06 18:06:22 art Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.115 2009/06/25 15:49:26 thib Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -2827,6 +2827,7 @@ again: if ((bp->b_flags & (B_BUSY | B_DELWRI | B_NEEDCOMMIT)) != (B_DELWRI | B_NEEDCOMMIT)) continue; + bremfree(bp); bp->b_flags |= B_WRITEINPROG; buf_acquire(bp); /* @@ -2905,6 +2906,7 @@ loop: panic("nfs_fsync: not dirty"); if ((passone || !commit) && (bp->b_flags & B_NEEDCOMMIT)) continue; + bremfree(bp); if (passone || !commit) { bp->b_flags |= B_ASYNC; } else { -- cgit v1.2.3