summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 0b224ad..219c62e 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -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);
OpenPOWER on IntegriCloud