NFS: Ensure the AUTH_UNIX credcache is allocated dynamically
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@ -27,7 +27,6 @@ struct generic_cred {
|
||||
};
|
||||
|
||||
static struct rpc_auth generic_auth;
|
||||
static struct rpc_cred_cache generic_cred_cache;
|
||||
static const struct rpc_credops generic_credops;
|
||||
|
||||
/*
|
||||
@ -159,20 +158,16 @@ out_nomatch:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __init rpc_init_generic_auth(void)
|
||||
int __init rpc_init_generic_auth(void)
|
||||
{
|
||||
spin_lock_init(&generic_cred_cache.lock);
|
||||
return rpcauth_init_credcache(&generic_auth);
|
||||
}
|
||||
|
||||
void __exit rpc_destroy_generic_auth(void)
|
||||
{
|
||||
rpcauth_clear_credcache(&generic_cred_cache);
|
||||
rpcauth_destroy_credcache(&generic_auth);
|
||||
}
|
||||
|
||||
static struct rpc_cred_cache generic_cred_cache = {
|
||||
{{ NULL, },},
|
||||
};
|
||||
|
||||
static const struct rpc_authops generic_auth_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.au_name = "Generic",
|
||||
@ -183,7 +178,6 @@ static const struct rpc_authops generic_auth_ops = {
|
||||
static struct rpc_auth generic_auth = {
|
||||
.au_ops = &generic_auth_ops,
|
||||
.au_count = ATOMIC_INIT(0),
|
||||
.au_credcache = &generic_cred_cache,
|
||||
};
|
||||
|
||||
static const struct rpc_credops generic_credops = {
|
||||
|
Reference in New Issue
Block a user