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>
This commit is contained in:

committed by
Anna Schumaker

parent
e91ff8e3c4
commit
c551858a88
@@ -7661,10 +7661,12 @@ struct rpc_procinfo nfs4_procedures[] = {
|
||||
#endif /* CONFIG_NFS_V4_2 */
|
||||
};
|
||||
|
||||
static unsigned int nfs_version4_counts[ARRAY_SIZE(nfs4_procedures)];
|
||||
const struct rpc_version nfs_version4 = {
|
||||
.number = 4,
|
||||
.nrprocs = ARRAY_SIZE(nfs4_procedures),
|
||||
.procs = nfs4_procedures
|
||||
.procs = nfs4_procedures,
|
||||
.counts = nfs_version4_counts,
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user