summaryrefslogtreecommitdiff
path: root/fs/lockd/clnt4xdr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 16:06:20 +0300
committerChristoph Hellwig <hch@lst.de>2017-05-15 18:42:15 +0300
commit1fa2339123f596d0c7608670d9052805a90e92ca (patch)
treec177d0809838ffdbde1c1788ff0fa0f25ef1bf7d /fs/lockd/clnt4xdr.c
parentd39916c48771597a3213758b6dc508b6b82083e4 (diff)
downloadlinux-1fa2339123f596d0c7608670d9052805a90e92ca.tar.xz
lockd: fix decoder callback prototypes
Declare the p_decode callbacks with the proper prototype instead of casting to kxdrdproc_t and losing all type safety. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jeff Layton <jlayton@redhat.com> Acked-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/lockd/clnt4xdr.c')
-rw-r--r--fs/lockd/clnt4xdr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
index 3cbad662120a..f0ab7a99dd23 100644
--- a/fs/lockd/clnt4xdr.c
+++ b/fs/lockd/clnt4xdr.c
@@ -533,8 +533,9 @@ out:
static int nlm4_xdr_dec_testres(struct rpc_rqst *req,
struct xdr_stream *xdr,
- struct nlm_res *result)
+ void *data)
{
+ struct nlm_res *result = data;
int error;
error = decode_cookie(xdr, &result->cookie);
@@ -553,8 +554,9 @@ out:
*/
static int nlm4_xdr_dec_res(struct rpc_rqst *req,
struct xdr_stream *xdr,
- struct nlm_res *result)
+ void *data)
{
+ struct nlm_res *result = data;
int error;
error = decode_cookie(xdr, &result->cookie);
@@ -575,7 +577,7 @@ out:
[NLMPROC_##proc] = { \
.p_proc = NLMPROC_##proc, \
.p_encode = nlm4_xdr_enc_##argtype, \
- .p_decode = (kxdrdproc_t)nlm4_xdr_dec_##restype, \
+ .p_decode = nlm4_xdr_dec_##restype, \
.p_arglen = NLM4_##argtype##_sz, \
.p_replen = NLM4_##restype##_sz, \
.p_statidx = NLMPROC_##proc, \