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>
这个提交包含在:
@@ -63,7 +63,7 @@ static int nfs4_decode_void(struct svc_rqst *rqstp, __be32 *p)
|
||||
return xdr_argsize_check(rqstp, p);
|
||||
}
|
||||
|
||||
static int nfs4_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy)
|
||||
static int nfs4_encode_void(struct svc_rqst *rqstp, __be32 *p)
|
||||
{
|
||||
return xdr_ressize_check(rqstp, p);
|
||||
}
|
||||
@@ -999,12 +999,12 @@ static struct svc_procedure nfs4_callback_procedures1[] = {
|
||||
[CB_NULL] = {
|
||||
.pc_func = nfs4_callback_null,
|
||||
.pc_decode = nfs4_decode_void,
|
||||
.pc_encode = (kxdrproc_t)nfs4_encode_void,
|
||||
.pc_encode = nfs4_encode_void,
|
||||
.pc_xdrressize = 1,
|
||||
},
|
||||
[CB_COMPOUND] = {
|
||||
.pc_func = nfs4_callback_compound,
|
||||
.pc_encode = (kxdrproc_t)nfs4_encode_void,
|
||||
.pc_encode = nfs4_encode_void,
|
||||
.pc_argsize = 256,
|
||||
.pc_ressize = 256,
|
||||
.pc_xdrressize = NFS4_CALLBACK_BUFSIZE,
|
||||
|
在新工单中引用
屏蔽一个用户