diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-08 23:27:10 +0200 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-07-13 15:57:57 -0400 |
commit | c551858a884b6d81def3d1528a9002ba97f5d4ad (patch) | |
tree | 636970ba560325fd56643680bc0961bf22bfff69 /fs/nfs/mount_clnt.c | |
parent | e91ff8e3c4cf0e4227fddabec87683401fc657ac (diff) | |
download | linux-stable-c551858a884b6d81def3d1528a9002ba97f5d4ad.tar.gz linux-stable-c551858a884b6d81def3d1528a9002ba97f5d4ad.tar.bz2 linux-stable-c551858a884b6d81def3d1528a9002ba97f5d4ad.zip |
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/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 806657d65074..d25914aa8bf9 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c @@ -504,17 +504,20 @@ static struct rpc_procinfo mnt3_procedures[] = { }, }; - +static unsigned int mnt_counts[ARRAY_SIZE(mnt_procedures)]; static const struct rpc_version mnt_version1 = { .number = 1, .nrprocs = ARRAY_SIZE(mnt_procedures), .procs = mnt_procedures, + .counts = mnt_counts, }; +static unsigned int mnt3_counts[ARRAY_SIZE(mnt_procedures)]; static const struct rpc_version mnt_version3 = { .number = 3, .nrprocs = ARRAY_SIZE(mnt3_procedures), .procs = mnt3_procedures, + .counts = mnt3_counts, }; static const struct rpc_version *mnt_version[] = { |