summaryrefslogtreecommitdiff
path: root/fs/nfsd/vfs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-06-18 16:45:00 +0200
committerJ. Bruce Fields <bfields@redhat.com>2015-06-22 14:15:03 -0400
commitaf90f707fa6d54dbb725c4b919c976cd23cd07f2 (patch)
treec213e59eaf06df375269a1471670dc5df201d849 /fs/nfsd/vfs.h
parenta0649b2d3fffb1cde8745568c767f3a55a3462bc (diff)
nfsd: take struct file setup fully into nfs4_preprocess_stateid_op
This patch changes nfs4_preprocess_stateid_op so it always returns a valid struct file if it has been asked for that. For that we now allocate a temporary struct file for special stateids, and check permissions if we got the file structure from the stateid. This ensures that all callers will get their handling of special stateids right, and avoids code duplication. There is a little wart in here because the read code needs to know if we allocated a file structure so that it can copy around the read-ahead parameters. In the long run we should probably aim to cache full file structures used with special stateids instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r--fs/nfsd/vfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index 053c4addbd9d..5be875e3e638 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -80,6 +80,10 @@ __be32 nfsd_read(struct svc_rqst *, struct svc_fh *,
loff_t, struct kvec *, int, unsigned long *);
__be32 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *,
loff_t, struct kvec *,int, unsigned long *, int *);
+__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);
__be32 nfsd_readlink(struct svc_rqst *, struct svc_fh *,
char *, int *);
__be32 nfsd_symlink(struct svc_rqst *, struct svc_fh *,