summaryrefslogtreecommitdiff
path: root/fs/lockd/mon.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-09 00:27:10 +0300
committerChristoph Hellwig <hch@lst.de>2017-05-15 18:42:18 +0300
commit1c5876ddbdb401f814ef717394826e7dfb6704d4 (patch)
tree225ae8fa49b447a2c7ace97f861031c7230ff76f /fs/lockd/mon.c
parentcdfa31e93fd228e197cc5bb31f0156117cea2156 (diff)
downloadlinux-1c5876ddbdb401f814ef717394826e7dfb6704d4.tar.xz
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/mon.c')
-rw-r--r--fs/lockd/mon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 62424e929a7f..fe4ec82764fe 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -552,10 +552,12 @@ static struct rpc_procinfo nsm_procedures[] = {
},
};
+static unsigned int nsm_version1_counts[ARRAY_SIZE(nsm_procedures)];
static const struct rpc_version nsm_version1 = {
.number = 1,
.nrprocs = ARRAY_SIZE(nsm_procedures),
- .procs = nsm_procedures
+ .procs = nsm_procedures,
+ .counts = nsm_version1_counts,
};
static const struct rpc_version *nsm_version[] = {