@@ -449,6 +449,7 @@ int core_tpg_del_initiator_node_acl(
449
449
int force )
450
450
{
451
451
struct se_session * sess , * sess_tmp ;
452
+ unsigned long flags ;
452
453
int dynamic_acl = 0 ;
453
454
454
455
spin_lock_irq (& tpg -> acl_node_lock );
@@ -460,7 +461,7 @@ int core_tpg_del_initiator_node_acl(
460
461
tpg -> num_node_acls -- ;
461
462
spin_unlock_irq (& tpg -> acl_node_lock );
462
463
463
- spin_lock_bh (& tpg -> session_lock );
464
+ spin_lock_irqsave (& tpg -> session_lock , flags );
464
465
list_for_each_entry_safe (sess , sess_tmp ,
465
466
& tpg -> tpg_sess_list , sess_list ) {
466
467
if (sess -> se_node_acl != acl )
@@ -471,16 +472,16 @@ int core_tpg_del_initiator_node_acl(
471
472
if (!tpg -> se_tpg_tfo -> shutdown_session (sess ))
472
473
continue ;
473
474
474
- spin_unlock_bh (& tpg -> session_lock );
475
+ spin_unlock_irqrestore (& tpg -> session_lock , flags );
475
476
/*
476
477
* If the $FABRIC_MOD session for the Initiator Node ACL exists,
477
478
* forcefully shutdown the $FABRIC_MOD session/nexus.
478
479
*/
479
480
tpg -> se_tpg_tfo -> close_session (sess );
480
481
481
- spin_lock_bh (& tpg -> session_lock );
482
+ spin_lock_irqsave (& tpg -> session_lock , flags );
482
483
}
483
- spin_unlock_bh (& tpg -> session_lock );
484
+ spin_unlock_irqrestore (& tpg -> session_lock , flags );
484
485
485
486
core_tpg_wait_for_nacl_pr_ref (acl );
486
487
core_clear_initiator_node_from_tpg (acl , tpg );
@@ -507,6 +508,7 @@ int core_tpg_set_initiator_node_queue_depth(
507
508
{
508
509
struct se_session * sess , * init_sess = NULL ;
509
510
struct se_node_acl * acl ;
511
+ unsigned long flags ;
510
512
int dynamic_acl = 0 ;
511
513
512
514
spin_lock_irq (& tpg -> acl_node_lock );
@@ -525,7 +527,7 @@ int core_tpg_set_initiator_node_queue_depth(
525
527
}
526
528
spin_unlock_irq (& tpg -> acl_node_lock );
527
529
528
- spin_lock_bh (& tpg -> session_lock );
530
+ spin_lock_irqsave (& tpg -> session_lock , flags );
529
531
list_for_each_entry (sess , & tpg -> tpg_sess_list , sess_list ) {
530
532
if (sess -> se_node_acl != acl )
531
533
continue ;
@@ -537,7 +539,7 @@ int core_tpg_set_initiator_node_queue_depth(
537
539
" depth and force session reinstatement"
538
540
" use the \"force=1\" parameter.\n" ,
539
541
tpg -> se_tpg_tfo -> get_fabric_name (), initiatorname );
540
- spin_unlock_bh (& tpg -> session_lock );
542
+ spin_unlock_irqrestore (& tpg -> session_lock , flags );
541
543
542
544
spin_lock_irq (& tpg -> acl_node_lock );
543
545
if (dynamic_acl )
@@ -567,7 +569,7 @@ int core_tpg_set_initiator_node_queue_depth(
567
569
acl -> queue_depth = queue_depth ;
568
570
569
571
if (core_set_queue_depth_for_node (tpg , acl ) < 0 ) {
570
- spin_unlock_bh (& tpg -> session_lock );
572
+ spin_unlock_irqrestore (& tpg -> session_lock , flags );
571
573
/*
572
574
* Force session reinstatement if
573
575
* core_set_queue_depth_for_node() failed, because we assume
@@ -583,7 +585,7 @@ int core_tpg_set_initiator_node_queue_depth(
583
585
spin_unlock_irq (& tpg -> acl_node_lock );
584
586
return - EINVAL ;
585
587
}
586
- spin_unlock_bh (& tpg -> session_lock );
588
+ spin_unlock_irqrestore (& tpg -> session_lock , flags );
587
589
/*
588
590
* If the $FABRIC_MOD session for the Initiator Node ACL exists,
589
591
* forcefully shutdown the $FABRIC_MOD session/nexus.
0 commit comments