diff options
author | Roland Dreier <roland@purestorage.com> | 2011-06-22 04:02:21 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-06-23 19:59:45 -0400 |
commit | 233888644d80cc44330062e5e978c9e3a14c9cb9 (patch) | |
tree | 88b2b59e76a5f73d27ebda4a0e4d5a3bac49a741 /drivers/target | |
parent | 7fd29aa920273b70be50c14c4b7e2213fb6623ce (diff) |
target: Convert transport_deregister_session_configfs nacl_sess_lock to save irq state
This patch converts transport_deregister_session_configfs() to save/restore
spinlock IRQ state for struct se_node_acl->nacl_sess_lock access as tcm_qla2xxx
logic expects to call transport_deregister_session_configfs() code with
irq save already held for struct qla_hw_data.
Reported-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_transport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 4dafeb8b5638..4b9b7169bdd9 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -536,13 +536,13 @@ EXPORT_SYMBOL(transport_register_session); | |||
536 | void transport_deregister_session_configfs(struct se_session *se_sess) | 536 | void transport_deregister_session_configfs(struct se_session *se_sess) |
537 | { | 537 | { |
538 | struct se_node_acl *se_nacl; | 538 | struct se_node_acl *se_nacl; |
539 | 539 | unsigned long flags; | |
540 | /* | 540 | /* |
541 | * Used by struct se_node_acl's under ConfigFS to locate active struct se_session | 541 | * Used by struct se_node_acl's under ConfigFS to locate active struct se_session |
542 | */ | 542 | */ |
543 | se_nacl = se_sess->se_node_acl; | 543 | se_nacl = se_sess->se_node_acl; |
544 | if ((se_nacl)) { | 544 | if ((se_nacl)) { |
545 | spin_lock_irq(&se_nacl->nacl_sess_lock); | 545 | spin_lock_irqsave(&se_nacl->nacl_sess_lock, flags); |
546 | list_del(&se_sess->sess_acl_list); | 546 | list_del(&se_sess->sess_acl_list); |
547 | /* | 547 | /* |
548 | * If the session list is empty, then clear the pointer. | 548 | * If the session list is empty, then clear the pointer. |
@@ -556,7 +556,7 @@ void transport_deregister_session_configfs(struct se_session *se_sess) | |||
556 | se_nacl->acl_sess_list.prev, | 556 | se_nacl->acl_sess_list.prev, |
557 | struct se_session, sess_acl_list); | 557 | struct se_session, sess_acl_list); |
558 | } | 558 | } |
559 | spin_unlock_irq(&se_nacl->nacl_sess_lock); | 559 | spin_unlock_irqrestore(&se_nacl->nacl_sess_lock, flags); |
560 | } | 560 | } |
561 | } | 561 | } |
562 | EXPORT_SYMBOL(transport_deregister_session_configfs); | 562 | EXPORT_SYMBOL(transport_deregister_session_configfs); |