public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] target: use RCU_INIT_POINTER() when NULLing.
@ 2016-05-01 12:52 Muhammad Falak R Wani
  2016-05-01 12:52 ` [PATCH 1/2] " Muhammad Falak R Wani
  2016-05-01 17:01 ` [PATCH 2/2] " Christoph Hellwig
  0 siblings, 2 replies; 10+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-01 12:52 UTC (permalink / raw)
  To: Nicholas A. Bellinger; +Cc: target-devel, linux-kernel

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@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-03 13:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-01 12:52 [PATCH 2/2] target: use RCU_INIT_POINTER() when NULLing Muhammad Falak R Wani
2016-05-01 12:52 ` [PATCH 1/2] " Muhammad Falak R Wani
2016-05-01 17:01 ` [PATCH 2/2] " Christoph Hellwig
2016-05-01 19:53   ` Paul E. McKenney
2016-05-02 14:10     ` Paul E. McKenney
2016-05-02 17:57       ` Paul E. McKenney
2016-05-02 17:59         ` Christoph Hellwig
2016-05-02 18:06           ` Paul E. McKenney
2016-05-03  8:45             ` Christoph Hellwig
2016-05-03 13:07               ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox