diff options
author | Christoph Hellwig | 2017-05-08 23:27:10 +0200 |
---|---|---|
committer | Christoph Hellwig | 2017-05-15 17:42:18 +0200 |
commit | 1c5876ddbdb401f814ef717394826e7dfb6704d4 (patch) | |
tree | 225ae8fa49b447a2c7ace97f861031c7230ff76f /fs/lockd/clnt4xdr.c | |
parent | cdfa31e93fd228e197cc5bb31f0156117cea2156 (diff) |
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 <hch@lst.de>
Diffstat (limited to 'fs/lockd/clnt4xdr.c')
-rw-r--r-- | fs/lockd/clnt4xdr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c index f0ab7a99dd23..7c255d1d7c64 100644 --- a/fs/lockd/clnt4xdr.c +++ b/fs/lockd/clnt4xdr.c @@ -602,8 +602,10 @@ static struct rpc_procinfo nlm4_procedures[] = { PROC(GRANTED_RES, res, norep), }; +static unsigned int nlm_version4_counts[ARRAY_SIZE(nlm4_procedures)]; const struct rpc_version nlm_version4 = { .number = 4, .nrprocs = ARRAY_SIZE(nlm4_procedures), .procs = nlm4_procedures, + .counts = nlm_version4_counts, }; |