From 1c5876ddbdb401f814ef717394826e7dfb6704d4 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 8 May 2017 23:27:10 +0200 Subject: sunrpc: move p_count out of struct rpc_procinfo p_count is the only writeable memeber of struct rpc_procinfo, which is a good candidate to be const-ified as it contains function pointers. This patch moves it into out out struct rpc_procinfo, and into a separate writable array that is pointed to by struct rpc_version and indexed by p_statidx. Signed-off-by: Christoph Hellwig --- fs/nfsd/nfs4callback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/nfsd/nfs4callback.c') diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index a2bedbd05b2b..afa961fe073c 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -705,6 +705,7 @@ static struct rpc_procinfo nfs4_cb_procedures[] = { PROC(CB_NOTIFY_LOCK, COMPOUND, cb_notify_lock, cb_notify_lock), }; +static unsigned int nfs4_cb_counts[ARRAY_SIZE(nfs4_cb_procedures)]; static struct rpc_version nfs_cb_version4 = { /* * Note on the callback rpc program version number: despite language in rfc @@ -715,7 +716,8 @@ static struct rpc_version nfs_cb_version4 = { */ .number = 1, .nrprocs = ARRAY_SIZE(nfs4_cb_procedures), - .procs = nfs4_cb_procedures + .procs = nfs4_cb_procedures, + .counts = nfs4_cb_counts, }; static const struct rpc_version *nfs_cb_version[] = { -- cgit v1.2.3