Skip to content

Commit 89a4f75

Browse files
NeilBrownamschuma-ntap
authored andcommitted
SUNRPC: remove generic cred code.
This is no longer used. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent a52458b commit 89a4f75

File tree

5 files changed

+2
-225
lines changed

5 files changed

+2
-225
lines changed

include/linux/sunrpc/auth.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ struct rpc_auth_create_args {
104104

105105
/* Flags for rpcauth_lookupcred() */
106106
#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
107-
#define RPCAUTH_LOOKUP_RCU 0x02 /* lock-less lookup */
108107

109108
/*
110109
* Client authentication ops
@@ -151,15 +150,10 @@ extern const struct rpc_authops authunix_ops;
151150
extern const struct rpc_authops authnull_ops;
152151

153152
int __init rpc_init_authunix(void);
154-
int __init rpc_init_generic_auth(void);
155153
int __init rpcauth_init_module(void);
156154
void rpcauth_remove_module(void);
157-
void rpc_destroy_generic_auth(void);
158155
void rpc_destroy_authunix(void);
159156

160-
struct rpc_cred * rpc_lookup_cred(void);
161-
struct rpc_cred * rpc_lookup_cred_nonblock(void);
162-
struct rpc_cred * rpc_lookup_generic_cred(struct auth_cred *, int, gfp_t);
163157
int rpcauth_register(const struct rpc_authops *);
164158
int rpcauth_unregister(const struct rpc_authops *);
165159
struct rpc_auth * rpcauth_create(const struct rpc_auth_create_args *,

net/sunrpc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ obj-$(CONFIG_SUNRPC_GSS) += auth_gss/
99
obj-$(CONFIG_SUNRPC_XPRT_RDMA) += xprtrdma/
1010

1111
sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \
12-
auth.o auth_null.o auth_unix.o auth_generic.o \
12+
auth.o auth_null.o auth_unix.o \
1313
svc.o svcsock.o svcauth.o svcauth_unix.o \
1414
addr.o rpcb_clnt.o timer.o xdr.o \
1515
sunrpc_syms.o cache.o rpc_pipe.o \

net/sunrpc/auth.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,6 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
578578
hlist_for_each_entry_rcu(entry, &cache->hashtable[nr], cr_hash) {
579579
if (!entry->cr_ops->crmatch(acred, entry, flags))
580580
continue;
581-
if (flags & RPCAUTH_LOOKUP_RCU) {
582-
if (test_bit(RPCAUTH_CRED_NEW, &entry->cr_flags) ||
583-
refcount_read(&entry->cr_count) == 0)
584-
continue;
585-
cred = entry;
586-
break;
587-
}
588581
cred = get_rpccred(entry);
589582
if (cred)
590583
break;
@@ -594,9 +587,6 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
594587
if (cred != NULL)
595588
goto found;
596589

597-
if (flags & RPCAUTH_LOOKUP_RCU)
598-
return ERR_PTR(-ECHILD);
599-
600590
new = auth->au_ops->crcreate(auth, acred, flags, gfp);
601591
if (IS_ERR(new)) {
602592
cred = new;
@@ -925,15 +915,10 @@ int __init rpcauth_init_module(void)
925915
err = rpc_init_authunix();
926916
if (err < 0)
927917
goto out1;
928-
err = rpc_init_generic_auth();
929-
if (err < 0)
930-
goto out2;
931918
err = register_shrinker(&rpc_cred_shrinker);
932919
if (err < 0)
933-
goto out3;
920+
goto out2;
934921
return 0;
935-
out3:
936-
rpc_destroy_generic_auth();
937922
out2:
938923
rpc_destroy_authunix();
939924
out1:
@@ -943,6 +928,5 @@ int __init rpcauth_init_module(void)
943928
void rpcauth_remove_module(void)
944929
{
945930
rpc_destroy_authunix();
946-
rpc_destroy_generic_auth();
947931
unregister_shrinker(&rpc_cred_shrinker);
948932
}

net/sunrpc/auth_generic.c

Lines changed: 0 additions & 199 deletions
This file was deleted.

net/sunrpc/auth_null.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ nul_destroy(struct rpc_auth *auth)
3636
static struct rpc_cred *
3737
nul_lookup_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
3838
{
39-
if (flags & RPCAUTH_LOOKUP_RCU)
40-
return &null_cred;
4139
return get_rpccred(&null_cred);
4240
}
4341

0 commit comments

Comments
 (0)