summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs3acl.c
diff options
context:
space:
mode:
authorChristoph Hellwig2017-05-08 19:42:02 +0200
committerChristoph Hellwig2017-05-15 17:42:25 +0200
commit63f8de37951a64cc24479eafd33085537e088075 (patch)
treee572e2542ef9370c9dfec6795660d52b72f77712 /fs/nfsd/nfs3acl.c
parentsunrpc: properly type pc_decode callbacks (diff)
downloadkernel-qcow2-linux-63f8de37951a64cc24479eafd33085537e088075.tar.gz
kernel-qcow2-linux-63f8de37951a64cc24479eafd33085537e088075.tar.xz
kernel-qcow2-linux-63f8de37951a64cc24479eafd33085537e088075.zip
sunrpc: properly type pc_encode callbacks
Drop the resp argument as it can trivially be derived from the rqstp argument. With that all functions now have the same prototype, and we can remove the unsafe casting to kxdrproc_t. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfsd/nfs3acl.c')
-rw-r--r--fs/nfsd/nfs3acl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c
index 4e68d6b5f409..9437b758cbfd 100644
--- a/fs/nfsd/nfs3acl.c
+++ b/fs/nfsd/nfs3acl.c
@@ -168,9 +168,9 @@ static int nfs3svc_decode_setaclargs(struct svc_rqst *rqstp, __be32 *p)
*/
/* GETACL */
-static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
- struct nfsd3_getaclres *resp)
+static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p)
{
+ struct nfsd3_getaclres *resp = rqstp->rq_resp;
struct dentry *dentry = resp->fh.fh_dentry;
p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
@@ -213,9 +213,10 @@ static int nfs3svc_encode_getaclres(struct svc_rqst *rqstp, __be32 *p,
}
/* SETACL */
-static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p,
- struct nfsd3_attrstat *resp)
+static int nfs3svc_encode_setaclres(struct svc_rqst *rqstp, __be32 *p)
{
+ struct nfsd3_attrstat *resp = rqstp->rq_resp;
+
p = nfs3svc_encode_post_op_attr(rqstp, p, &resp->fh);
return xdr_ressize_check(rqstp, p);
@@ -243,7 +244,7 @@ struct nfsd3_voidargs { int dummy; };
{ \
.pc_func = nfsd3_proc_##name, \
.pc_decode = nfs3svc_decode_##argt##args, \
- .pc_encode = (kxdrproc_t) nfs3svc_encode_##rest##res, \
+ .pc_encode = nfs3svc_encode_##rest##res, \
.pc_release = nfs3svc_release_##relt, \
.pc_argsize = sizeof(struct nfsd3_##argt##args), \
.pc_ressize = sizeof(struct nfsd3_##rest##res), \