summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChristoph Hellwig2017-05-08 23:40:27 +0200
committerChristoph Hellwig2017-05-15 17:42:30 +0200
commit7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53 (patch)
tree394d5e146fc57c81264231b0ee58e5a23379f6ea /fs/nfs
parentnfsd4: properly type op_func callbacks (diff)
downloadkernel-qcow2-linux-7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53.tar.gz
kernel-qcow2-linux-7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53.tar.xz
kernel-qcow2-linux-7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53.zip
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/nfs')
-rw-r--r--fs/nfs/callback_xdr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index acf75dc63e14..ecd46b8c0985 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -1011,20 +1011,24 @@ static struct svc_procedure nfs4_callback_procedures1[] = {
}
};
+static unsigned int nfs4_callback_count1[ARRAY_SIZE(nfs4_callback_procedures1)];
struct svc_version nfs4_callback_version1 = {
.vs_vers = 1,
.vs_nproc = ARRAY_SIZE(nfs4_callback_procedures1),
.vs_proc = nfs4_callback_procedures1,
+ .vs_count = nfs4_callback_count1,
.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
.vs_dispatch = NULL,
.vs_hidden = true,
.vs_need_cong_ctrl = true,
};
+static unsigned int nfs4_callback_count4[ARRAY_SIZE(nfs4_callback_procedures1)];
struct svc_version nfs4_callback_version4 = {
.vs_vers = 4,
.vs_nproc = ARRAY_SIZE(nfs4_callback_procedures1),
.vs_proc = nfs4_callback_procedures1,
+ .vs_count = nfs4_callback_count4,
.vs_xdrsize = NFS4_CALLBACK_XDRSIZE,
.vs_dispatch = NULL,
.vs_hidden = true,