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>
This commit is contained in:
Christoph Hellwig
2017-05-08 23:40:27 +02:00
parent eb69853da9
commit 7fd38af9ca
10 changed files with 28 additions and 7 deletions

View File

@@ -2554,10 +2554,12 @@ static struct svc_procedure nfsd_procedures4[2] = {
},
};
static unsigned int nfsd_count3[ARRAY_SIZE(nfsd_procedures4)];
struct svc_version nfsd_version4 = {
.vs_vers = 4,
.vs_nproc = 2,
.vs_proc = nfsd_procedures4,
.vs_count = nfsd_count3,
.vs_dispatch = nfsd_dispatch,
.vs_xdrsize = NFS4_SVC_XDRSIZE,
.vs_rpcb_optnl = true,