summaryrefslogtreecommitdiffstats
path: root/fs/nfs/mount_clnt.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-08 23:27:10 +0200
committerChristoph Hellwig <hch@lst.de>2017-05-15 17:42:18 +0200
commit1c5876ddbdb401f814ef717394826e7dfb6704d4 (patch)
tree225ae8fa49b447a2c7ace97f861031c7230ff76f /fs/nfs/mount_clnt.c
parentcdfa31e93fd228e197cc5bb31f0156117cea2156 (diff)
downloadop-kernel-dev-1c5876ddbdb401f814ef717394826e7dfb6704d4.zip
op-kernel-dev-1c5876ddbdb401f814ef717394826e7dfb6704d4.tar.gz
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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 806657d..d25914aa 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[] = {
OpenPOWER on IntegriCloud