summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs2xdr.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-09 00:27:10 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-13 22:57:57 +0300
commitc551858a884b6d81def3d1528a9002ba97f5d4ad (patch)
tree636970ba560325fd56643680bc0961bf22bfff69 /fs/nfs/nfs2xdr.c
parente91ff8e3c4cf0e4227fddabec87683401fc657ac (diff)
downloadlinux-c551858a884b6d81def3d1528a9002ba97f5d4ad.tar.xz
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/nfs2xdr.c')
-rw-r--r--fs/nfs/nfs2xdr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index a299648ea321..16b4526299c1 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -1170,8 +1170,10 @@ struct rpc_procinfo nfs_procedures[] = {
PROC(STATFS, fhandle, statfsres, 0),
};
+static unsigned int nfs_version2_counts[ARRAY_SIZE(nfs_procedures)];
const struct rpc_version nfs_version2 = {
.number = 2,
.nrprocs = ARRAY_SIZE(nfs_procedures),
- .procs = nfs_procedures
+ .procs = nfs_procedures,
+ .counts = nfs_version2_counts,
};