summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2010-10-29 13:34:57 +0000
committerrmacklem <rmacklem@FreeBSD.org>2010-10-29 13:34:57 +0000
commitb6cd17990d125d91ed9a1a32e708c186c2fd3945 (patch)
tree4d205ebd02c344a6e3c512cdc99135c07ff93df4 /sys/fs
parenta5ea18413ed6beb09aa13011f52cb7f193b1614e (diff)
downloadFreeBSD-src-b6cd17990d125d91ed9a1a32e708c186c2fd3945.zip
FreeBSD-src-b6cd17990d125d91ed9a1a32e708c186c2fd3945.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clnode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c
index 8ca1c43..430b494 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.
OpenPOWER on IntegriCloud