SUNRPC: Add lockless lookup of the server's auth domain
Avoid taking the global auth_domain_lock in most lookups of the auth domain by adding an RCU protected lookup. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
30382d6ce5
commit
608a0ab2f5
@@ -1764,14 +1764,21 @@ out_err:
|
||||
}
|
||||
|
||||
static void
|
||||
svcauth_gss_domain_release(struct auth_domain *dom)
|
||||
svcauth_gss_domain_release_rcu(struct rcu_head *head)
|
||||
{
|
||||
struct auth_domain *dom = container_of(head, struct auth_domain, rcu_head);
|
||||
struct gss_domain *gd = container_of(dom, struct gss_domain, h);
|
||||
|
||||
kfree(dom->name);
|
||||
kfree(gd);
|
||||
}
|
||||
|
||||
static void
|
||||
svcauth_gss_domain_release(struct auth_domain *dom)
|
||||
{
|
||||
call_rcu(&dom->rcu_head, svcauth_gss_domain_release_rcu);
|
||||
}
|
||||
|
||||
static struct auth_ops svcauthops_gss = {
|
||||
.name = "rpcsec_gss",
|
||||
.owner = THIS_MODULE,
|
||||
|
Reference in New Issue
Block a user