summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 23:40:27 +0200
committerChristoph Hellwig <hch@lst.de>2017-05-15 17:42:30 +0200
commit7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53 (patch)
tree394d5e146fc57c81264231b0ee58e5a23379f6ea /fs/lockd
parenteb69853da9459280d89876cfc3da11292e59f7af (diff)
downloadlinux-7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53.tar.bz2
sunrpc: move pc_count out of struct svc_procinfo
pc_count is the only writeable memeber of struct svc_procinfo, which is a good candidate to be const-ified as it contains function pointers. This patch moves it into out out struct svc_procinfo, and into a separate writable array that is pointed to by struct svc_version. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 5d481e8a1b5d..cc6abe6280bc 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -739,23 +739,29 @@ module_exit(exit_nlm);
/*
* Define NLM program and procedures
*/
+static unsigned int nlmsvc_version1_count[17];
static struct svc_version nlmsvc_version1 = {
.vs_vers = 1,
.vs_nproc = 17,
.vs_proc = nlmsvc_procedures,
+ .vs_count = nlmsvc_version1_count,
.vs_xdrsize = NLMSVC_XDRSIZE,
};
+static unsigned int nlmsvc_version3_count[24];
static struct svc_version nlmsvc_version3 = {
.vs_vers = 3,
.vs_nproc = 24,
.vs_proc = nlmsvc_procedures,
+ .vs_count = nlmsvc_version3_count,
.vs_xdrsize = NLMSVC_XDRSIZE,
};
#ifdef CONFIG_LOCKD_V4
+static unsigned int nlmsvc_version4_count[24];
static struct svc_version nlmsvc_version4 = {
.vs_vers = 4,
.vs_nproc = 24,
.vs_proc = nlmsvc_procedures4,
+ .vs_count = nlmsvc_version4_count,
.vs_xdrsize = NLMSVC_XDRSIZE,
};
#endif