[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1462107122-9562-1-git-send-email-falakreyaz@gmail.com>
Date: Sun, 1 May 2016 18:22:01 +0530
From: Muhammad Falak R Wani <falakreyaz@...il.com>
To: "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
Cc: target-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] target: use RCU_INIT_POINTER() when NULLing.
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@...il.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
Powered by blists - more mailing lists