mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
fcst: Introduce kfree_rcu() (merge r4106 from trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -78,16 +78,6 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
|
||||
return tport;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free tport via RCU.
|
||||
*/
|
||||
static void ft_tport_rcu_free(struct rcu_head *rcu)
|
||||
{
|
||||
struct ft_tport *tport = container_of(rcu, struct ft_tport, rcu);
|
||||
|
||||
kfree(tport);
|
||||
}
|
||||
|
||||
/*
|
||||
* Delete target local port, if any, associated with the local port.
|
||||
* Caller holds ft_lport_lock.
|
||||
@@ -105,7 +95,7 @@ static void ft_tport_delete(struct ft_tport *tport)
|
||||
BUG_ON(tport != lport->prov[FC_TYPE_FCP]);
|
||||
rcu_assign_pointer(lport->prov[FC_TYPE_FCP], NULL);
|
||||
tport->lport = NULL;
|
||||
call_rcu(&tport->rcu, ft_tport_rcu_free);
|
||||
kfree_rcu(tport, rcu);
|
||||
ft_tport_count--;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user