diff options
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 1f4c794f5fcc..260c3e1e312c 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c | |||
@@ -4540,6 +4540,7 @@ static void iscsit_logout_post_handler_diffcid( | |||
4540 | { | 4540 | { |
4541 | struct iscsi_conn *l_conn; | 4541 | struct iscsi_conn *l_conn; |
4542 | struct iscsi_session *sess = conn->sess; | 4542 | struct iscsi_session *sess = conn->sess; |
4543 | bool conn_found = false; | ||
4543 | 4544 | ||
4544 | if (!sess) | 4545 | if (!sess) |
4545 | return; | 4546 | return; |
@@ -4548,12 +4549,13 @@ static void iscsit_logout_post_handler_diffcid( | |||
4548 | list_for_each_entry(l_conn, &sess->sess_conn_list, conn_list) { | 4549 | list_for_each_entry(l_conn, &sess->sess_conn_list, conn_list) { |
4549 | if (l_conn->cid == cid) { | 4550 | if (l_conn->cid == cid) { |
4550 | iscsit_inc_conn_usage_count(l_conn); | 4551 | iscsit_inc_conn_usage_count(l_conn); |
4552 | conn_found = true; | ||
4551 | break; | 4553 | break; |
4552 | } | 4554 | } |
4553 | } | 4555 | } |
4554 | spin_unlock_bh(&sess->conn_lock); | 4556 | spin_unlock_bh(&sess->conn_lock); |
4555 | 4557 | ||
4556 | if (!l_conn) | 4558 | if (!conn_found) |
4557 | return; | 4559 | return; |
4558 | 4560 | ||
4559 | if (l_conn->sock) | 4561 | if (l_conn->sock) |