diff options
author | Andreea-Cristina Bernat <bernat.ada@gmail.com> | 2014-08-18 16:05:37 +0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-09-16 01:27:33 +0400 |
commit | c04047eceed45ae210d020868672456c33cae300 (patch) | |
tree | 464906d52d206f26b47425fc9e5e1c9fc54cebda /drivers/target/tcm_fc | |
parent | e1ea97fef0cd579fd7ef3851548e068eaf2ad9f0 (diff) | |
download | linux-c04047eceed45ae210d020868672456c33cae300.tar.xz |
tcm_fc: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
The use of "rcu_assign_pointer()" is NULLing out the pointer.
According to RCU_INIT_POINTER()'s block comment:
"1. This use of RCU_INIT_POINTER() is NULLing out the pointer"
it is better to use it instead of rcu_assign_pointer() because it has a
smaller overhead.
The following Coccinelle semantic patch was used:
@@
@@
- rcu_assign_pointer
+ RCU_INIT_POINTER
(..., NULL)
Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_sess.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c index 21ce50880c79..ccee7e332a4d 100644 --- a/drivers/target/tcm_fc/tfc_sess.c +++ b/drivers/target/tcm_fc/tfc_sess.c @@ -98,7 +98,7 @@ static void ft_tport_delete(struct ft_tport *tport) ft_sess_delete_all(tport); lport = tport->lport; BUG_ON(tport != lport->prov[FC_TYPE_FCP]); - rcu_assign_pointer(lport->prov[FC_TYPE_FCP], NULL); + RCU_INIT_POINTER(lport->prov[FC_TYPE_FCP], NULL); tpg = tport->tpg; if (tpg) { |