diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-08 17:40:27 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 11:42:30 -0400 |
commit | 7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53 (patch) | |
tree | 394d5e146fc57c81264231b0ee58e5a23379f6ea /fs/lockd | |
parent | eb69853da9459280d89876cfc3da11292e59f7af (diff) |
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.c | 6 |
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); | |||
739 | /* | 739 | /* |
740 | * Define NLM program and procedures | 740 | * Define NLM program and procedures |
741 | */ | 741 | */ |
742 | static unsigned int nlmsvc_version1_count[17]; | ||
742 | static struct svc_version nlmsvc_version1 = { | 743 | static struct svc_version nlmsvc_version1 = { |
743 | .vs_vers = 1, | 744 | .vs_vers = 1, |
744 | .vs_nproc = 17, | 745 | .vs_nproc = 17, |
745 | .vs_proc = nlmsvc_procedures, | 746 | .vs_proc = nlmsvc_procedures, |
747 | .vs_count = nlmsvc_version1_count, | ||
746 | .vs_xdrsize = NLMSVC_XDRSIZE, | 748 | .vs_xdrsize = NLMSVC_XDRSIZE, |
747 | }; | 749 | }; |
750 | static unsigned int nlmsvc_version3_count[24]; | ||
748 | static struct svc_version nlmsvc_version3 = { | 751 | static struct svc_version nlmsvc_version3 = { |
749 | .vs_vers = 3, | 752 | .vs_vers = 3, |
750 | .vs_nproc = 24, | 753 | .vs_nproc = 24, |
751 | .vs_proc = nlmsvc_procedures, | 754 | .vs_proc = nlmsvc_procedures, |
755 | .vs_count = nlmsvc_version3_count, | ||
752 | .vs_xdrsize = NLMSVC_XDRSIZE, | 756 | .vs_xdrsize = NLMSVC_XDRSIZE, |
753 | }; | 757 | }; |
754 | #ifdef CONFIG_LOCKD_V4 | 758 | #ifdef CONFIG_LOCKD_V4 |
759 | static unsigned int nlmsvc_version4_count[24]; | ||
755 | static struct svc_version nlmsvc_version4 = { | 760 | static struct svc_version nlmsvc_version4 = { |
756 | .vs_vers = 4, | 761 | .vs_vers = 4, |
757 | .vs_nproc = 24, | 762 | .vs_nproc = 24, |
758 | .vs_proc = nlmsvc_procedures4, | 763 | .vs_proc = nlmsvc_procedures4, |
764 | .vs_count = nlmsvc_version4_count, | ||
759 | .vs_xdrsize = NLMSVC_XDRSIZE, | 765 | .vs_xdrsize = NLMSVC_XDRSIZE, |
760 | }; | 766 | }; |
761 | #endif | 767 | #endif |