sunrpc: properly type pc_release callbacks

Drop the p and resp arguments as they are always NULL or 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>
This commit is contained in:
Christoph Hellwig
2017-05-08 18:48:24 +02:00
orang tua a6beb73272
melakukan 8537488b5a
12 mengubah file dengan 63 tambahan dan 66 penghapusan

Melihat File

@@ -318,27 +318,27 @@ static int nfsaclsvc_encode_accessres(struct svc_rqst *rqstp, __be32 *p,
/*
* XDR release functions
*/
static int nfsaclsvc_release_getacl(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_getaclres *resp)
static void nfsaclsvc_release_getacl(struct svc_rqst *rqstp)
{
struct nfsd3_getaclres *resp = rqstp->rq_resp;
fh_put(&resp->fh);
posix_acl_release(resp->acl_access);
posix_acl_release(resp->acl_default);
return 1;
}
static int nfsaclsvc_release_attrstat(struct svc_rqst *rqstp, __be32 *p,
struct nfsd_attrstat *resp)
static void nfsaclsvc_release_attrstat(struct svc_rqst *rqstp)
{
struct nfsd_attrstat *resp = rqstp->rq_resp;
fh_put(&resp->fh);
return 1;
}
static int nfsaclsvc_release_access(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_accessres *resp)
static void nfsaclsvc_release_access(struct svc_rqst *rqstp)
{
fh_put(&resp->fh);
return 1;
struct nfsd3_accessres *resp = rqstp->rq_resp;
fh_put(&resp->fh);
}
#define nfsaclsvc_decode_voidargs NULL
@@ -353,7 +353,7 @@ struct nfsd3_voidargs { int dummy; };
.pc_func = nfsacld_proc_##name, \
.pc_decode = (kxdrproc_t) nfsaclsvc_decode_##argt##args, \
.pc_encode = (kxdrproc_t) nfsaclsvc_encode_##rest##res, \
.pc_release = (kxdrproc_t) nfsaclsvc_release_##relt, \
.pc_release = nfsaclsvc_release_##relt, \
.pc_argsize = sizeof(struct nfsd3_##argt##args), \
.pc_ressize = sizeof(struct nfsd3_##rest##res), \
.pc_cachetype = cache, \