aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-20 13:53:56 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 19:28:20 -0500
commita613fa168afc19179a7547fbba45644c5b6912bf (patch)
tree02db1b9ca905ff49d9811175607757e3a885325f /net/sunrpc
parent080b794ce5ad318ce34c52abaedf1bc6788a5abb (diff)
SUNRPC: constify the rpc_program
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/clnt.c8
-rw-r--r--net/sunrpc/rpcb_clnt.c20
2 files changed, 14 insertions, 14 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 1b2317fa4043..db7220d87732 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -238,8 +238,8 @@ void rpc_clients_notifier_unregister(void)
238 238
239static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, struct rpc_xprt *xprt) 239static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, struct rpc_xprt *xprt)
240{ 240{
241 struct rpc_program *program = args->program; 241 const struct rpc_program *program = args->program;
242 struct rpc_version *version; 242 const struct rpc_version *version;
243 struct rpc_clnt *clnt = NULL; 243 struct rpc_clnt *clnt = NULL;
244 struct rpc_auth *auth; 244 struct rpc_auth *auth;
245 int err; 245 int err;
@@ -626,11 +626,11 @@ rpc_release_client(struct rpc_clnt *clnt)
626 * The Sun NFSv2/v3 ACL protocol can do this. 626 * The Sun NFSv2/v3 ACL protocol can do this.
627 */ 627 */
628struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old, 628struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old,
629 struct rpc_program *program, 629 const struct rpc_program *program,
630 u32 vers) 630 u32 vers)
631{ 631{
632 struct rpc_clnt *clnt; 632 struct rpc_clnt *clnt;
633 struct rpc_version *version; 633 const struct rpc_version *version;
634 int err; 634 int err;
635 635
636 BUG_ON(vers >= program->nrvers || !program->version[vers]); 636 BUG_ON(vers >= program->nrvers || !program->version[vers]);
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index d3978017b25d..b1f08bd67883 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -112,7 +112,7 @@ enum {
112 112
113static void rpcb_getport_done(struct rpc_task *, void *); 113static void rpcb_getport_done(struct rpc_task *, void *);
114static void rpcb_map_release(void *data); 114static void rpcb_map_release(void *data);
115static struct rpc_program rpcb_program; 115static const struct rpc_program rpcb_program;
116 116
117struct rpcbind_args { 117struct rpcbind_args {
118 struct rpc_xprt * r_xprt; 118 struct rpc_xprt * r_xprt;
@@ -137,8 +137,8 @@ struct rpcb_info {
137 struct rpc_procinfo * rpc_proc; 137 struct rpc_procinfo * rpc_proc;
138}; 138};
139 139
140static struct rpcb_info rpcb_next_version[]; 140static const struct rpcb_info rpcb_next_version[];
141static struct rpcb_info rpcb_next_version6[]; 141static const struct rpcb_info rpcb_next_version6[];
142 142
143static const struct rpc_call_ops rpcb_getport_ops = { 143static const struct rpc_call_ops rpcb_getport_ops = {
144 .rpc_call_done = rpcb_getport_done, 144 .rpc_call_done = rpcb_getport_done,
@@ -1051,7 +1051,7 @@ static struct rpc_procinfo rpcb_procedures4[] = {
1051 }, 1051 },
1052}; 1052};
1053 1053
1054static struct rpcb_info rpcb_next_version[] = { 1054static const struct rpcb_info rpcb_next_version[] = {
1055 { 1055 {
1056 .rpc_vers = RPCBVERS_2, 1056 .rpc_vers = RPCBVERS_2,
1057 .rpc_proc = &rpcb_procedures2[RPCBPROC_GETPORT], 1057 .rpc_proc = &rpcb_procedures2[RPCBPROC_GETPORT],
@@ -1061,7 +1061,7 @@ static struct rpcb_info rpcb_next_version[] = {
1061 }, 1061 },
1062}; 1062};
1063 1063
1064static struct rpcb_info rpcb_next_version6[] = { 1064static const struct rpcb_info rpcb_next_version6[] = {
1065 { 1065 {
1066 .rpc_vers = RPCBVERS_4, 1066 .rpc_vers = RPCBVERS_4,
1067 .rpc_proc = &rpcb_procedures4[RPCBPROC_GETADDR], 1067 .rpc_proc = &rpcb_procedures4[RPCBPROC_GETADDR],
@@ -1075,25 +1075,25 @@ static struct rpcb_info rpcb_next_version6[] = {
1075 }, 1075 },
1076}; 1076};
1077 1077
1078static struct rpc_version rpcb_version2 = { 1078static const struct rpc_version rpcb_version2 = {
1079 .number = RPCBVERS_2, 1079 .number = RPCBVERS_2,
1080 .nrprocs = ARRAY_SIZE(rpcb_procedures2), 1080 .nrprocs = ARRAY_SIZE(rpcb_procedures2),
1081 .procs = rpcb_procedures2 1081 .procs = rpcb_procedures2
1082}; 1082};
1083 1083
1084static struct rpc_version rpcb_version3 = { 1084static const struct rpc_version rpcb_version3 = {
1085 .number = RPCBVERS_3, 1085 .number = RPCBVERS_3,
1086 .nrprocs = ARRAY_SIZE(rpcb_procedures3), 1086 .nrprocs = ARRAY_SIZE(rpcb_procedures3),
1087 .procs = rpcb_procedures3 1087 .procs = rpcb_procedures3
1088}; 1088};
1089 1089
1090static struct rpc_version rpcb_version4 = { 1090static const struct rpc_version rpcb_version4 = {
1091 .number = RPCBVERS_4, 1091 .number = RPCBVERS_4,
1092 .nrprocs = ARRAY_SIZE(rpcb_procedures4), 1092 .nrprocs = ARRAY_SIZE(rpcb_procedures4),
1093 .procs = rpcb_procedures4 1093 .procs = rpcb_procedures4
1094}; 1094};
1095 1095
1096static struct rpc_version *rpcb_version[] = { 1096static const struct rpc_version *rpcb_version[] = {
1097 NULL, 1097 NULL,
1098 NULL, 1098 NULL,
1099 &rpcb_version2, 1099 &rpcb_version2,
@@ -1103,7 +1103,7 @@ static struct rpc_version *rpcb_version[] = {
1103 1103
1104static struct rpc_stat rpcb_stats; 1104static struct rpc_stat rpcb_stats;
1105 1105
1106static struct rpc_program rpcb_program = { 1106static const struct rpc_program rpcb_program = {
1107 .name = "rpcbind", 1107 .name = "rpcbind",
1108 .number = RPCBIND_PROGRAM, 1108 .number = RPCBIND_PROGRAM,
1109 .nrvers = ARRAY_SIZE(rpcb_version), 1109 .nrvers = ARRAY_SIZE(rpcb_version),