svn commit: r195943 - head/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Wed Jul 29 14:50:32 UTC 2009
Author: rmacklem
Date: Wed Jul 29 14:50:31 2009
New Revision: 195943
URL: http://svn.freebsd.org/changeset/base/195943
Log:
Fix the experimental nfs client so that it only calls ncl_vinvalbuf()
for NFSv2 and not NFSv4 when nfscl_mustflush() returns 0. Since
nfscl_mustflush() only returns 0 when there is a valid write delegation
issued to the client, it only affects the case of an NFSv4 mount with
callbacks/delegations enabled.
Approved by: re (kensmith), kib (mentor)
Modified:
head/sys/fs/nfsclient/nfs_clvnops.c
Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvnops.c Wed Jul 29 14:44:09 2009 (r195942)
+++ head/sys/fs/nfsclient/nfs_clvnops.c Wed Jul 29 14:50:31 2009 (r195943)
@@ -687,11 +687,17 @@ nfs_close(struct vop_close_args *ap)
int cm = newnfs_commit_on_close ? 1 : 0;
error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm);
/* np->n_flag &= ~NMODIFIED; */
- } else if (NFS_ISV4(vp) && nfscl_mustflush(vp)) {
- int cm = newnfs_commit_on_close ? 1 : 0;
- error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm);
- /* as above w.r.t. races when clearing NMODIFIED */
- /* np->n_flag &= ~NMODIFIED; */
+ } else if (NFS_ISV4(vp)) {
+ if (nfscl_mustflush(vp)) {
+ int cm = newnfs_commit_on_close ? 1 : 0;
+ error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td,
+ cm);
+ /*
+ * as above w.r.t races when clearing
+ * NMODIFIED.
+ * np->n_flag &= ~NMODIFIED;
+ */
+ }
} else
error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1);
mtx_lock(&np->n_mtx);
More information about the svn-src-head
mailing list