Skip to content

Commit d6efccd

Browse files
NeilBrownamschuma-ntap
authored andcommitted
SUNRPC: remove crbind rpc_cred operation
This now always just does get_rpccred(), so we don't need an operation pointer to know to do that. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 89a4f75 commit d6efccd

File tree

5 files changed

+1
-17
lines changed

5 files changed

+1
-17
lines changed

include/linux/sunrpc/auth.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ struct rpc_credops {
133133
void (*crdestroy)(struct rpc_cred *);
134134

135135
int (*crmatch)(struct auth_cred *, struct rpc_cred *, int);
136-
struct rpc_cred * (*crbind)(struct rpc_task *, struct rpc_cred *, int);
137136
__be32 * (*crmarshal)(struct rpc_task *, __be32 *);
138137
int (*crrefresh)(struct rpc_task *);
139138
__be32 * (*crvalidate)(struct rpc_task *, __be32 *);
@@ -167,7 +166,6 @@ int rpcauth_list_flavors(rpc_authflavor_t *, int);
167166
struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int, gfp_t);
168167
void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *);
169168
struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int);
170-
struct rpc_cred * rpcauth_generic_bind_cred(struct rpc_task *, struct rpc_cred *, int);
171169
void put_rpccred(struct rpc_cred *);
172170
__be32 * rpcauth_marshcred(struct rpc_task *, __be32 *);
173171
__be32 * rpcauth_checkverf(struct rpc_task *, __be32 *);

net/sunrpc/auth.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -658,15 +658,6 @@ rpcauth_init_cred(struct rpc_cred *cred, const struct auth_cred *acred,
658658
}
659659
EXPORT_SYMBOL_GPL(rpcauth_init_cred);
660660

661-
struct rpc_cred *
662-
rpcauth_generic_bind_cred(struct rpc_task *task, struct rpc_cred *cred, int lookupflags)
663-
{
664-
dprintk("RPC: %5u holding %s cred %p\n", task->tk_pid,
665-
cred->cr_auth->au_ops->au_name, cred);
666-
return get_rpccred(cred);
667-
}
668-
EXPORT_SYMBOL_GPL(rpcauth_generic_bind_cred);
669-
670661
static struct rpc_cred *
671662
rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags)
672663
{
@@ -724,8 +715,7 @@ rpcauth_bindcred(struct rpc_task *task, const struct cred *cred, int flags)
724715
lookupflags |= RPCAUTH_LOOKUP_NEW;
725716
if (task->tk_op_cred)
726717
/* Task must use exactly this rpc_cred */
727-
new = task->tk_op_cred->cr_ops->crbind(task, task->tk_op_cred,
728-
lookupflags);
718+
new = get_rpccred(task->tk_op_cred);
729719
else if (cred != NULL && cred != &machine_cred)
730720
new = auth->au_ops->lookup_cred(auth, &acred, lookupflags);
731721
else if (cred == &machine_cred)

net/sunrpc/auth_gss/auth_gss.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,6 @@ static const struct rpc_credops gss_credops = {
20952095
.cr_name = "AUTH_GSS",
20962096
.crdestroy = gss_destroy_cred,
20972097
.cr_init = gss_cred_init,
2098-
.crbind = rpcauth_generic_bind_cred,
20992098
.crmatch = gss_match,
21002099
.crmarshal = gss_marshal,
21012100
.crrefresh = gss_refresh,
@@ -2110,7 +2109,6 @@ static const struct rpc_credops gss_credops = {
21102109
static const struct rpc_credops gss_nullops = {
21112110
.cr_name = "AUTH_GSS",
21122111
.crdestroy = gss_destroy_nullcred,
2113-
.crbind = rpcauth_generic_bind_cred,
21142112
.crmatch = gss_match,
21152113
.crmarshal = gss_marshal,
21162114
.crrefresh = gss_refresh_null,

net/sunrpc/auth_null.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ static
123123
const struct rpc_credops null_credops = {
124124
.cr_name = "AUTH_NULL",
125125
.crdestroy = nul_destroy_cred,
126-
.crbind = rpcauth_generic_bind_cred,
127126
.crmatch = nul_match,
128127
.crmarshal = nul_marshal,
129128
.crrefresh = nul_refresh,

net/sunrpc/auth_unix.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ static
246246
const struct rpc_credops unix_credops = {
247247
.cr_name = "AUTH_UNIX",
248248
.crdestroy = unx_destroy_cred,
249-
.crbind = rpcauth_generic_bind_cred,
250249
.crmatch = unx_match,
251250
.crmarshal = unx_marshal,
252251
.crrefresh = unx_refresh,

0 commit comments

Comments
 (0)