aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/tcm_fc/tfc_sess.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-01-06 20:02:13 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-02-21 12:03:29 -0500
commita6c76da8f8b4549ccec7425ba94d8395d68a2e56 (patch)
treeac2c59a5f20fa26c75e7193cbd0257554fb3b723 /drivers/target/tcm_fc/tfc_sess.c
parentbc399d6e6ed8615007110f5e438886ffd236760e (diff)
tcm_fc: Convert call_rcu() to kfree_rcu(), drop ft_tport_rcu_free()
The call_rcu() in ft_tport_delete() invokes ft_tport_rcu_free(), which just does a kfree(). So convert the call_rcu() to kfree_rcu(), allowing ft_tport_rcu_free() to be eliminated. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Jesper Juhl <jj@chaosbits.net> Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org
Diffstat (limited to 'drivers/target/tcm_fc/tfc_sess.c')
-rw-r--r--drivers/target/tcm_fc/tfc_sess.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
index 4c0507cf808c..eff512b5a2a0 100644
--- a/drivers/target/tcm_fc/tfc_sess.c
+++ b/drivers/target/tcm_fc/tfc_sess.c
@@ -86,16 +86,6 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
86} 86}
87 87
88/* 88/*
89 * Free tport via RCU.
90 */
91static void ft_tport_rcu_free(struct rcu_head *rcu)
92{
93 struct ft_tport *tport = container_of(rcu, struct ft_tport, rcu);
94
95 kfree(tport);
96}
97
98/*
99 * Delete a target local port. 89 * Delete a target local port.
100 * Caller holds ft_lport_lock. 90 * Caller holds ft_lport_lock.
101 */ 91 */
@@ -114,7 +104,7 @@ static void ft_tport_delete(struct ft_tport *tport)
114 tpg->tport = NULL; 104 tpg->tport = NULL;
115 tport->tpg = NULL; 105 tport->tpg = NULL;
116 } 106 }
117 call_rcu(&tport->rcu, ft_tport_rcu_free); 107 kfree_rcu(tport, rcu);
118} 108}
119 109
120/* 110/*