The callback function of call_rcu() just calls a kfree(), so we
can use kfree_rcu() instead of call_rcu() + callback function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
return ret;
}
-static void ft_sess_rcu_free(struct rcu_head *rcu)
-{
- struct ft_sess *sess = container_of(rcu, struct ft_sess, rcu);
-
- kfree(sess);
-}
-
static void ft_sess_free(struct kref *kref)
{
struct ft_sess *sess = container_of(kref, struct ft_sess, kref);
transport_deregister_session(sess->se_sess);
- call_rcu(&sess->rcu, ft_sess_rcu_free);
+ kfree_rcu(sess, rcu);
}
void ft_sess_put(struct ft_sess *sess)