projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'acpica-fixes', 'acpi-video' and 'acpi-processor'
[deliverable/linux.git]
/
fs
/
nfsd
/
vfs.c
diff --git
a/fs/nfsd/vfs.c
b/fs/nfsd/vfs.c
index d40010e4f1a97e6591914d6815d924ce6bd0964b..6fbd81ecb41080a6e81aa712fc45af77c3a4fde1 100644
(file)
--- a/
fs/nfsd/vfs.c
+++ b/
fs/nfsd/vfs.c
@@
-935,8
+935,8
@@
nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
int stable = *stablep;
int use_wgather;
loff_t pos = offset;
int stable = *stablep;
int use_wgather;
loff_t pos = offset;
- loff_t end = LLONG_MAX;
unsigned int pflags = current->flags;
unsigned int pflags = current->flags;
+ int flags = 0;
if (test_bit(RQ_LOCAL, &rqstp->rq_flags))
/*
if (test_bit(RQ_LOCAL, &rqstp->rq_flags))
/*
@@
-955,9
+955,12
@@
nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
if (!EX_ISSYNC(exp))
stable = 0;
if (!EX_ISSYNC(exp))
stable = 0;
+ if (stable && !use_wgather)
+ flags |= RWF_SYNC;
+
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
- host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &pos,
0
);
+ host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &pos,
flags
);
set_fs(oldfs);
if (host_err < 0)
goto out_nfserr;
set_fs(oldfs);
if (host_err < 0)
goto out_nfserr;
@@
-965,15
+968,8
@@
nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
nfsdstats.io_write += host_err;
fsnotify_modify(file);
nfsdstats.io_write += host_err;
fsnotify_modify(file);
- if (stable) {
- if (use_wgather) {
- host_err = wait_for_concurrent_writes(file);
- } else {
- if (*cnt)
- end = offset + *cnt - 1;
- host_err = vfs_fsync_range(file, offset, end, 0);
- }
- }
+ if (stable && use_wgather)
+ host_err = wait_for_concurrent_writes(file);
out_nfserr:
dprintk("nfsd: write complete host_err=%d\n", host_err);
out_nfserr:
dprintk("nfsd: write complete host_err=%d\n", host_err);
This page took
0.045506 seconds
and
5
git commands to generate.