diff options
| author | Sargun Dhillon <sargun@sargun.me> | 2018-07-05 12:48:50 -0400 |
|---|---|---|
| committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-07-30 13:19:41 -0400 |
| commit | 82b98ca566ca2af170eb0ab50cef09dd7335fa55 (patch) | |
| tree | 10feac49203ef740d43cbf89cdbe0aa6f8fa36a3 /net | |
| parent | 0914bb965e38a055e9245637aed117efbe976e91 (diff) | |
net/sunrpc: Make rpc_auth_create_args a const
This turns rpc_auth_create_args into a const as it gets passed through the
auth stack.
Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/sunrpc/auth.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 9 | ||||
| -rw-r--r-- | net/sunrpc/auth_null.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/auth_unix.c | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index d2623b9f23d6..661e2277f468 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
| @@ -253,7 +253,7 @@ rpcauth_list_flavors(rpc_authflavor_t *array, int size) | |||
| 253 | EXPORT_SYMBOL_GPL(rpcauth_list_flavors); | 253 | EXPORT_SYMBOL_GPL(rpcauth_list_flavors); |
| 254 | 254 | ||
| 255 | struct rpc_auth * | 255 | struct rpc_auth * |
| 256 | rpcauth_create(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) | 256 | rpcauth_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt) |
| 257 | { | 257 | { |
| 258 | struct rpc_auth *auth; | 258 | struct rpc_auth *auth; |
| 259 | const struct rpc_authops *ops; | 259 | const struct rpc_authops *ops; |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index be8f103d22fd..21a19a9f0e33 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
| @@ -985,7 +985,7 @@ static void gss_pipe_free(struct gss_pipe *p) | |||
| 985 | * parameters based on the input flavor (which must be a pseudoflavor) | 985 | * parameters based on the input flavor (which must be a pseudoflavor) |
| 986 | */ | 986 | */ |
| 987 | static struct gss_auth * | 987 | static struct gss_auth * |
| 988 | gss_create_new(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) | 988 | gss_create_new(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt) |
| 989 | { | 989 | { |
| 990 | rpc_authflavor_t flavor = args->pseudoflavor; | 990 | rpc_authflavor_t flavor = args->pseudoflavor; |
| 991 | struct gss_auth *gss_auth; | 991 | struct gss_auth *gss_auth; |
| @@ -1132,7 +1132,7 @@ gss_destroy(struct rpc_auth *auth) | |||
| 1132 | * (which is guaranteed to last as long as any of its descendants). | 1132 | * (which is guaranteed to last as long as any of its descendants). |
| 1133 | */ | 1133 | */ |
| 1134 | static struct gss_auth * | 1134 | static struct gss_auth * |
| 1135 | gss_auth_find_or_add_hashed(struct rpc_auth_create_args *args, | 1135 | gss_auth_find_or_add_hashed(const struct rpc_auth_create_args *args, |
| 1136 | struct rpc_clnt *clnt, | 1136 | struct rpc_clnt *clnt, |
| 1137 | struct gss_auth *new) | 1137 | struct gss_auth *new) |
| 1138 | { | 1138 | { |
| @@ -1169,7 +1169,8 @@ out: | |||
| 1169 | } | 1169 | } |
| 1170 | 1170 | ||
| 1171 | static struct gss_auth * | 1171 | static struct gss_auth * |
| 1172 | gss_create_hashed(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) | 1172 | gss_create_hashed(const struct rpc_auth_create_args *args, |
| 1173 | struct rpc_clnt *clnt) | ||
| 1173 | { | 1174 | { |
| 1174 | struct gss_auth *gss_auth; | 1175 | struct gss_auth *gss_auth; |
| 1175 | struct gss_auth *new; | 1176 | struct gss_auth *new; |
| @@ -1188,7 +1189,7 @@ out: | |||
| 1188 | } | 1189 | } |
| 1189 | 1190 | ||
| 1190 | static struct rpc_auth * | 1191 | static struct rpc_auth * |
| 1191 | gss_create(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) | 1192 | gss_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt) |
| 1192 | { | 1193 | { |
| 1193 | struct gss_auth *gss_auth; | 1194 | struct gss_auth *gss_auth; |
| 1194 | struct rpc_xprt_switch *xps = rcu_access_pointer(clnt->cl_xpi.xpi_xpswitch); | 1195 | struct rpc_xprt_switch *xps = rcu_access_pointer(clnt->cl_xpi.xpi_xpswitch); |
diff --git a/net/sunrpc/auth_null.c b/net/sunrpc/auth_null.c index 75d72e109a04..4b48228ee8c7 100644 --- a/net/sunrpc/auth_null.c +++ b/net/sunrpc/auth_null.c | |||
| @@ -19,7 +19,7 @@ static struct rpc_auth null_auth; | |||
| 19 | static struct rpc_cred null_cred; | 19 | static struct rpc_cred null_cred; |
| 20 | 20 | ||
| 21 | static struct rpc_auth * | 21 | static struct rpc_auth * |
| 22 | nul_create(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) | 22 | nul_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt) |
| 23 | { | 23 | { |
| 24 | atomic_inc(&null_auth.au_count); | 24 | atomic_inc(&null_auth.au_count); |
| 25 | return &null_auth; | 25 | return &null_auth; |
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index dafd6b870ba3..185e56d4f9ae 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c | |||
| @@ -30,7 +30,7 @@ static struct rpc_auth unix_auth; | |||
| 30 | static const struct rpc_credops unix_credops; | 30 | static const struct rpc_credops unix_credops; |
| 31 | 31 | ||
| 32 | static struct rpc_auth * | 32 | static struct rpc_auth * |
| 33 | unx_create(struct rpc_auth_create_args *args, struct rpc_clnt *clnt) | 33 | unx_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt) |
| 34 | { | 34 | { |
| 35 | dprintk("RPC: creating UNIX authenticator for client %p\n", | 35 | dprintk("RPC: creating UNIX authenticator for client %p\n", |
| 36 | clnt); | 36 | clnt); |
