[PATCH 2/2] target: use RCU_INIT_POINTER() when NULLing.
From: Muhammad Falak R Wani
Date: Sun May 01 2016 - 08:52:19 EST
It is safe to use RCU_INIT_POINTER() to NULL, instead of
rcu_assign_pointer().
This results in slightly smaller/faster code.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@xxxxxxxxx>
---
drivers/target/target_core_tpg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index ddf0460..7ae0f08 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -684,7 +684,7 @@ void core_tpg_remove_lun(
spin_lock(&dev->se_port_lock);
list_del(&lun->lun_dev_link);
dev->export_count--;
- rcu_assign_pointer(lun->lun_se_dev, NULL);
+ RCU_INIT_POINTER(lun->lun_se_dev, NULL);
spin_unlock(&dev->se_port_lock);
}
if (!(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE))
--
1.9.1