summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index ee3c8d9..8bc0be9 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -2580,6 +2580,16 @@ nfs_strategy(struct vop_strategy_args *ap)
static int
nfs_fsync(struct vop_fsync_args *ap)
{
+
+ if (ap->a_vp->v_type != VREG) {
+ /*
+ * For NFS, metadata is changed synchronously on the server,
+ * so there is nothing to flush. Also, ncl_flush() clears
+ * the NMODIFIED flag and that shouldn't be done here for
+ * directories.
+ */
+ return (0);
+ }
return (ncl_flush(ap->a_vp, ap->a_waitfor, NULL, ap->a_td, 1, 0));
}
OpenPOWER on IntegriCloud