It is safe to use RCU_INIT_POINTER() to NULL, instead of rcu_assign_pointer(). This results in slightly smaller/faster code. The follwoing semantic patch was used: <smpl> @@ @@ - rcu_assign_pointer + RCU_INIT_POINTER (..., NULL) </smpl> Signed-off-by: Muhammad Falak R Wani <falakreyaz@xxxxxxxxx> --- drivers/target/target_core_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index a4046ca..6f81e3b 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -432,8 +432,8 @@ void core_disable_device_list_for_node( kref_put(&orig->pr_kref, target_pr_kref_release); wait_for_completion(&orig->pr_comp); - rcu_assign_pointer(orig->se_lun, NULL); - rcu_assign_pointer(orig->se_lun_acl, NULL); + RCU_INIT_POINTER(orig->se_lun, NULL); + RCU_INIT_POINTER(orig->se_lun_acl, NULL); kfree_rcu(orig, rcu_head); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html