pdu: Remove the checking for iscsi->is_loggedin in iscsi_cancel_pdus()

I don't see any problems that calling the callback
during connect/login in iscsi_cancel_pdus(). So let's
remove this check. Otherwise, we have no way to be aware
of a cancellation during login and cause something like
iscsi_login_sync() hangs.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
This commit is contained in:
Xie Yongji
2020-06-03 13:49:44 +08:00
parent 10868c491d
commit e9c1f10258

View File

@@ -784,10 +784,7 @@ iscsi_cancel_pdus(struct iscsi_context *iscsi)
while ((pdu = iscsi->outqueue)) {
ISCSI_LIST_REMOVE(&iscsi->outqueue, pdu);
if (iscsi->is_loggedin && pdu->callback) {
/* If an error happened during connect/login,
we don't want to call any of the callbacks.
*/
if (pdu->callback) {
pdu->callback(iscsi, SCSI_STATUS_CANCELLED,
NULL, pdu->private_data);
}
@@ -801,10 +798,7 @@ iscsi_cancel_pdus(struct iscsi_context *iscsi)
}
while ((pdu = iscsi->waitpdu)) {
ISCSI_LIST_REMOVE(&iscsi->waitpdu, pdu);
if (iscsi->is_loggedin && pdu->callback) {
/* If an error happened during connect/login,
we don't want to call any of the callbacks.
*/
if (pdu->callback) {
pdu->callback(iscsi, SCSI_STATUS_CANCELLED,
NULL, pdu->private_data);
}