summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2023-03-24 17:39:15 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-24 17:39:15 -0400
commitae2fb3cb0f00482c0ec0079e4244bdee3e1fc46b (patch)
tree39102f757a3ecbabdd6ea259f2b659821ea5c374 /drivers/target/target_core_tpg.c
parent5c8c74ef20e7973c270498dbbf96170c9f92dae3 (diff)
parentea87981a0ee8fb8ced1c87d004a541b60623ff97 (diff)
Merge patch series "target: TMF and recovery fixes"
Mike Christie <michael.christie@oracle.com> says: The following patches apply over Martin's 6.4 branches and Linus's tree. They fix a couple regressions in iscsit that occur when there are TMRs executing and a connection is closed. It also includes Dimitry's fixes in related code paths for cmd cleanup when ERL2 is used and the write pending hang during conn cleanup. This version of the patchset brings it back to just regressions and fixes for bugs we have a lot of users hitting. I'm going to fix isert and get it hooked into iscsit properly in a second patchset, because this one was getting so large. I've also moved my cleanup type of patches for a 3rd patchset. Link: https://lore.kernel.org/r/20230319015620.96006-1-michael.christie@oracle.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 2e079c6a8e8c..c0e429e5ef31 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -329,7 +329,7 @@ static void target_shutdown_sessions(struct se_node_acl *acl)
restart:
spin_lock_irqsave(&acl->nacl_sess_lock, flags);
list_for_each_entry(sess, &acl->acl_sess_list, sess_acl_list) {
- if (atomic_read(&sess->stopped))
+ if (sess->cmd_cnt && atomic_read(&sess->cmd_cnt->stopped))
continue;
list_del_init(&sess->sess_acl_list);