[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1462107122-9562-2-git-send-email-falakreyaz@gmail.com>
Date: Sun, 1 May 2016 18:22:02 +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 1/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.
The follwoing semantic patch was used:
<smpl>
@@
@@
- rcu_assign_pointer
+ RCU_INIT_POINTER
(..., NULL)
</smpl>
Signed-off-by: Muhammad Falak R Wani <falakreyaz@...il.com>
---
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
Powered by blists - more mailing lists