diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2016-12-31 20:59:53 +0800 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-01-31 12:31:53 -0500 |
commit | 54bbb7d206db78a3dfd87bc8d9735cbe3ac3f938 (patch) | |
tree | 940db662527f1be3a5144f09094556cb614896c1 /fs/nfsd/vfs.c | |
parent | e35659f1b03c03946cae8abb6b0a9e170b574f1c (diff) | |
download | op-kernel-dev-54bbb7d206db78a3dfd87bc8d9735cbe3ac3f938.zip op-kernel-dev-54bbb7d206db78a3dfd87bc8d9735cbe3ac3f938.tar.gz |
NFSD: pass an integer for stable type to nfsd_vfs_write
After fae5096ad217 "nfsd: assume writeable exportabled filesystems have
f_sync" we no longer modify this argument.
This is just cleanup, no change in functionality.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index ca13236..1bedb2b 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -917,14 +917,13 @@ static int wait_for_concurrent_writes(struct file *file) __be32 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, loff_t offset, struct kvec *vec, int vlen, - unsigned long *cnt, int *stablep) + unsigned long *cnt, int stable) { struct svc_export *exp; struct inode *inode; mm_segment_t oldfs; __be32 err = 0; int host_err; - int stable = *stablep; int use_wgather; loff_t pos = offset; unsigned int pflags = current->flags; @@ -945,7 +944,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp); if (!EX_ISSYNC(exp)) - stable = 0; + stable = NFS_UNSTABLE; if (stable && !use_wgather) flags |= RWF_SYNC; @@ -1014,7 +1013,7 @@ __be32 nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, __be32 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, loff_t offset, struct kvec *vec, int vlen, unsigned long *cnt, - int *stablep) + int stable) { __be32 err = 0; @@ -1027,7 +1026,7 @@ nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, goto out; trace_write_opened(rqstp, fhp, offset, vlen); err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, cnt, - stablep); + stable); trace_write_io_done(rqstp, fhp, offset, vlen); } else { err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_WRITE, &file); @@ -1037,7 +1036,7 @@ nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, trace_write_opened(rqstp, fhp, offset, vlen); if (cnt) err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, - cnt, stablep); + cnt, stable); trace_write_io_done(rqstp, fhp, offset, vlen); fput(file); } |