diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1998-05-13 06:15:36 +0000 | 
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1998-05-13 06:15:36 +0000 | 
| commit | d1639eab005eab8897b98e7471084e35a3e1bfb3 (patch) | |
| tree | 542ced6fd0bc9bfd95228a5faf417e3b3e57511e | |
| parent | 6e7ee0c1b000e0f65e3fe98c5597d2d6cedce88e (diff) | |
Notes
| -rw-r--r-- | sys/nfs/nfs_node.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 57472319d038..de0b6153ea3f 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -34,7 +34,7 @@   * SUCH DAMAGE.   *   *	@(#)nfs_node.c	8.2 (Berkeley) 12/30/93 - * $Id: nfs_node.c,v 1.13 1996/06/12 03:37:46 davidg Exp $ + * $Id: nfs_node.c,v 1.13.2.1 1997/05/14 08:19:27 dfr Exp $   */  #include <sys/param.h> @@ -203,6 +203,13 @@ nfs_inactive(ap)  		sp = (struct sillyrename *)0;  	if (sp) {  		/* +		 * XXX We need a reference to keep the vnode from being +		 * recycled by getnewvnode while we do the I/O +		 * associated with discarding the buffers. +		 */ +		if (vget(ap->a_vp, 0)) +			panic("nfs_inactive: lost vnode"); +		/*  		 * Remove the silly file that was rename'd earlier  		 */  		(void) nfs_vinvalbuf(ap->a_vp, 0, sp->s_cred, p, 1); @@ -210,6 +217,7 @@ nfs_inactive(ap)  		crfree(sp->s_cred);  		vrele(sp->s_dvp);  		FREE((caddr_t)sp, M_NFSREQ); +		vrele(ap->a_vp);	/* XXX Undo above reference */  	}  	np->n_flag &= (NMODIFIED | NFLUSHINPROG | NFLUSHWANT | NQNFSEVICTED |  		NQNFSNONCACHE | NQNFSWRITE); | 
