Skip to content

Commit

Permalink
tcm_fc: Convert call_rcu() to kfree_rcu(), drop ft_tport_rcu_free()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Paul E. McKenney authored and Paul E. McKenney committed Feb 21, 2012
1 parent bc399d6 commit a6c76da
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/target/tcm_fc/tfc_sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,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 a target local port.
* Caller holds ft_lport_lock.
Expand All @@ -114,7 +104,7 @@ static void ft_tport_delete(struct ft_tport *tport)
tpg->tport = NULL;
tport->tpg = NULL;
}
call_rcu(&tport->rcu, ft_tport_rcu_free);
kfree_rcu(tport, rcu);
}

/*
Expand Down

0 comments on commit a6c76da

Please sign in to comment.