aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/target/target_core_alua.c4
-rw-r--r--drivers/target/target_core_device.c12
-rw-r--r--drivers/target/target_core_pr.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index aa2e4b103d43..c56ae024c42e 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -968,7 +968,7 @@ static void core_alua_queue_state_change_ua(struct t10_alua_tg_pt_gp *tg_pt_gp)
968 continue; 968 continue;
969 spin_unlock(&tg_pt_gp->tg_pt_gp_lock); 969 spin_unlock(&tg_pt_gp->tg_pt_gp_lock);
970 970
971 spin_lock_bh(&lun->lun_deve_lock); 971 spin_lock(&lun->lun_deve_lock);
972 list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) { 972 list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) {
973 lacl = rcu_dereference_check(se_deve->se_lun_acl, 973 lacl = rcu_dereference_check(se_deve->se_lun_acl,
974 lockdep_is_held(&lun->lun_deve_lock)); 974 lockdep_is_held(&lun->lun_deve_lock));
@@ -1000,7 +1000,7 @@ static void core_alua_queue_state_change_ua(struct t10_alua_tg_pt_gp *tg_pt_gp)
1000 core_scsi3_ua_allocate(se_deve, 0x2A, 1000 core_scsi3_ua_allocate(se_deve, 0x2A,
1001 ASCQ_2AH_ASYMMETRIC_ACCESS_STATE_CHANGED); 1001 ASCQ_2AH_ASYMMETRIC_ACCESS_STATE_CHANGED);
1002 } 1002 }
1003 spin_unlock_bh(&lun->lun_deve_lock); 1003 spin_unlock(&lun->lun_deve_lock);
1004 1004
1005 spin_lock(&tg_pt_gp->tg_pt_gp_lock); 1005 spin_lock(&tg_pt_gp->tg_pt_gp_lock);
1006 percpu_ref_put(&lun->lun_ref); 1006 percpu_ref_put(&lun->lun_ref);
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index ed084023e7d4..b6df5b9a6890 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -352,10 +352,10 @@ int core_enable_device_list_for_node(
352 hlist_add_head_rcu(&new->link, &nacl->lun_entry_hlist); 352 hlist_add_head_rcu(&new->link, &nacl->lun_entry_hlist);
353 mutex_unlock(&nacl->lun_entry_mutex); 353 mutex_unlock(&nacl->lun_entry_mutex);
354 354
355 spin_lock_bh(&lun->lun_deve_lock); 355 spin_lock(&lun->lun_deve_lock);
356 list_del(&orig->lun_link); 356 list_del(&orig->lun_link);
357 list_add_tail(&new->lun_link, &lun->lun_deve_list); 357 list_add_tail(&new->lun_link, &lun->lun_deve_list);
358 spin_unlock_bh(&lun->lun_deve_lock); 358 spin_unlock(&lun->lun_deve_lock);
359 359
360 kref_put(&orig->pr_kref, target_pr_kref_release); 360 kref_put(&orig->pr_kref, target_pr_kref_release);
361 wait_for_completion(&orig->pr_comp); 361 wait_for_completion(&orig->pr_comp);
@@ -369,9 +369,9 @@ int core_enable_device_list_for_node(
369 hlist_add_head_rcu(&new->link, &nacl->lun_entry_hlist); 369 hlist_add_head_rcu(&new->link, &nacl->lun_entry_hlist);
370 mutex_unlock(&nacl->lun_entry_mutex); 370 mutex_unlock(&nacl->lun_entry_mutex);
371 371
372 spin_lock_bh(&lun->lun_deve_lock); 372 spin_lock(&lun->lun_deve_lock);
373 list_add_tail(&new->lun_link, &lun->lun_deve_list); 373 list_add_tail(&new->lun_link, &lun->lun_deve_list);
374 spin_unlock_bh(&lun->lun_deve_lock); 374 spin_unlock(&lun->lun_deve_lock);
375 375
376 return 0; 376 return 0;
377} 377}
@@ -403,9 +403,9 @@ void core_disable_device_list_for_node(
403 * NodeACL context specific PR metadata for demo-mode 403 * NodeACL context specific PR metadata for demo-mode
404 * MappedLUN *deve will be released below.. 404 * MappedLUN *deve will be released below..
405 */ 405 */
406 spin_lock_bh(&lun->lun_deve_lock); 406 spin_lock(&lun->lun_deve_lock);
407 list_del(&orig->lun_link); 407 list_del(&orig->lun_link);
408 spin_unlock_bh(&lun->lun_deve_lock); 408 spin_unlock(&lun->lun_deve_lock);
409 /* 409 /*
410 * Disable struct se_dev_entry LUN ACL mapping 410 * Disable struct se_dev_entry LUN ACL mapping
411 */ 411 */
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 0bb329243dba..7403b03d428f 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -709,7 +709,7 @@ static struct t10_pr_registration *__core_scsi3_alloc_registration(
709 continue; 709 continue;
710 spin_unlock(&dev->se_port_lock); 710 spin_unlock(&dev->se_port_lock);
711 711
712 spin_lock_bh(&lun_tmp->lun_deve_lock); 712 spin_lock(&lun_tmp->lun_deve_lock);
713 list_for_each_entry(deve_tmp, &lun_tmp->lun_deve_list, lun_link) { 713 list_for_each_entry(deve_tmp, &lun_tmp->lun_deve_list, lun_link) {
714 /* 714 /*
715 * This pointer will be NULL for demo mode MappedLUNs 715 * This pointer will be NULL for demo mode MappedLUNs
@@ -742,7 +742,7 @@ static struct t10_pr_registration *__core_scsi3_alloc_registration(
742 continue; 742 continue;
743 743
744 kref_get(&deve_tmp->pr_kref); 744 kref_get(&deve_tmp->pr_kref);
745 spin_unlock_bh(&lun_tmp->lun_deve_lock); 745 spin_unlock(&lun_tmp->lun_deve_lock);
746 /* 746 /*
747 * Grab a configfs group dependency that is released 747 * Grab a configfs group dependency that is released
748 * for the exception path at label out: below, or upon 748 * for the exception path at label out: below, or upon
@@ -779,9 +779,9 @@ static struct t10_pr_registration *__core_scsi3_alloc_registration(
779 779
780 list_add_tail(&pr_reg_atp->pr_reg_atp_mem_list, 780 list_add_tail(&pr_reg_atp->pr_reg_atp_mem_list,
781 &pr_reg->pr_reg_atp_list); 781 &pr_reg->pr_reg_atp_list);
782 spin_lock_bh(&lun_tmp->lun_deve_lock); 782 spin_lock(&lun_tmp->lun_deve_lock);
783 } 783 }
784 spin_unlock_bh(&lun_tmp->lun_deve_lock); 784 spin_unlock(&lun_tmp->lun_deve_lock);
785 785
786 spin_lock(&dev->se_port_lock); 786 spin_lock(&dev->se_port_lock);
787 percpu_ref_put(&lun_tmp->lun_ref); 787 percpu_ref_put(&lun_tmp->lun_ref);