mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
SUNRPC: Convert the credcache lookup code to use RCU
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
e092bdcd93
commit
31be5bf15f
4 changed files with 92 additions and 44 deletions
|
@ -93,11 +93,23 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
|
|||
}
|
||||
|
||||
static void
|
||||
unx_destroy_cred(struct rpc_cred *rcred)
|
||||
unx_free_cred(struct unx_cred *unx_cred)
|
||||
{
|
||||
struct unx_cred *cred = container_of(rcred, struct unx_cred, uc_base);
|
||||
dprintk("RPC: unx_free_cred %p\n", unx_cred);
|
||||
kfree(unx_cred);
|
||||
}
|
||||
|
||||
kfree(cred);
|
||||
static void
|
||||
unx_free_cred_callback(struct rcu_head *head)
|
||||
{
|
||||
struct unx_cred *unx_cred = container_of(head, struct unx_cred, uc_base.cr_rcu);
|
||||
unx_free_cred(unx_cred);
|
||||
}
|
||||
|
||||
static void
|
||||
unx_destroy_cred(struct rpc_cred *cred)
|
||||
{
|
||||
call_rcu(&cred->cr_rcu, unx_free_cred_callback);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue