From f52496a0369789e0cc60769362d8d479fa298b3b Mon Sep 17 00:00:00 2001 From: rmacklem Date: Fri, 5 Nov 2010 02:33:27 +0000 Subject: [PATCH] MFC: r214511 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(). git-svn-id: svn://svn.freebsd.org/base/stable/8@214820 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/fs/nfsclient/nfs_clnode.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index 339c95277..5c24e40d2 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -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. -- 2.45.0