[PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()

From: bigeasy@xxxxxxxxxxxxx
Date: Fri Mar 23 2018 - 13:20:28 EST


__target_attach_tg_pt_gp() and __target_detach_tg_pt_gp() check if the caller
holds lun_tg_pt_gp_lock(). Both functions are static, the callers are
acquiring the lock before the invocation of the function so the check
looks superfluous.
Remove it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
drivers/target/target_core_alua.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index e46ca968009c..e5bda674bdbd 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -1843,8 +1843,6 @@ static void __target_attach_tg_pt_gp(struct se_lun *lun,
{
struct se_dev_entry *se_deve;

- assert_spin_locked(&lun->lun_tg_pt_gp_lock);
-
spin_lock(&tg_pt_gp->tg_pt_gp_lock);
lun->lun_tg_pt_gp = tg_pt_gp;
list_add_tail(&lun->lun_tg_pt_gp_link, &tg_pt_gp->tg_pt_gp_lun_list);
@@ -1868,8 +1866,6 @@ void target_attach_tg_pt_gp(struct se_lun *lun,
static void __target_detach_tg_pt_gp(struct se_lun *lun,
struct t10_alua_tg_pt_gp *tg_pt_gp)
{
- assert_spin_locked(&lun->lun_tg_pt_gp_lock);
-
spin_lock(&tg_pt_gp->tg_pt_gp_lock);
list_del_init(&lun->lun_tg_pt_gp_link);
tg_pt_gp->tg_pt_gp_members--;
--
2.16.2