aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/vfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 989129e2d6ea..d16076bd9a7a 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -938,6 +938,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
938 int stable = *stablep; 938 int stable = *stablep;
939 int use_wgather; 939 int use_wgather;
940 loff_t pos = offset; 940 loff_t pos = offset;
941 loff_t end = LLONG_MAX;
941 unsigned int pflags = current->flags; 942 unsigned int pflags = current->flags;
942 943
943 if (rqstp->rq_local) 944 if (rqstp->rq_local)
@@ -969,10 +970,13 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
969 fsnotify_modify(file); 970 fsnotify_modify(file);
970 971
971 if (stable) { 972 if (stable) {
972 if (use_wgather) 973 if (use_wgather) {
973 host_err = wait_for_concurrent_writes(file); 974 host_err = wait_for_concurrent_writes(file);
974 else 975 } else {
975 host_err = vfs_fsync_range(file, offset, offset+*cnt, 0); 976 if (*cnt)
977 end = offset + *cnt - 1;
978 host_err = vfs_fsync_range(file, offset, end, 0);
979 }
976 } 980 }
977 981
978out_nfserr: 982out_nfserr: