Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2010 13:34:57 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r214511 - head/sys/fs/nfsclient
Message-ID:  <201010291334.o9TDYvG0027311@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Fri Oct 29 13:34:57 2010
New Revision: 214511
URL: http://svn.freebsd.org/changeset/base/214511

Log:
  Add a call for nfsrpc_close() to ncl_reclaim() in the experimental
  NFSv4 client, since the call in ncl_inactive() might be missed
  because VOP_INACTIVE() is not guaranteed to be called before
  VOP_RECLAIM().
  
  MFC after:	1 week

Modified:
  head/sys/fs/nfsclient/nfs_clnode.c

Modified: head/sys/fs/nfsclient/nfs_clnode.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clnode.c	Fri Oct 29 13:31:10 2010	(r214510)
+++ head/sys/fs/nfsclient/nfs_clnode.c	Fri Oct 29 13:34:57 2010	(r214511)
@@ -236,6 +236,15 @@ ncl_reclaim(struct vop_reclaim_args *ap)
 	if (prtactive && vrefcnt(vp) != 0)
 		vprint("ncl_reclaim: pushing active", vp);
 
+	if (NFS_ISV4(vp) && vp->v_type == VREG)
+		/*
+		 * Since mmap()'d files do I/O after VOP_CLOSE(), the NFSv4
+		 * Close operations are delayed until ncl_inactive().
+		 * However, since VOP_INACTIVE() is not guaranteed to be
+		 * called, we need to do it again here.
+		 */
+		(void) nfsrpc_close(vp, 1, ap->a_td);
+
 	/*
 	 * If the NLM is running, give it a chance to abort pending
 	 * locks.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010291334.o9TDYvG0027311>