libiscsi: Make the cancellation aware of the pdus in old iscsi context

We should check the pdus in old iscsi context when
cancelling tasks.

Signed-off-by: wanghonghao <wanghonghao@bytedance.com>
This commit is contained in:
wanghonghao
2020-06-23 19:48:26 +08:00
committed by Xie Yongji
parent e9c1f10258
commit aad136e5b9

View File

@@ -2708,6 +2708,11 @@ iscsi_scsi_cancel_task(struct iscsi_context *iscsi,
}
}
}
if (iscsi->old_iscsi) {
return iscsi_scsi_cancel_task(iscsi->old_iscsi, task);
}
return ret;
}
@@ -2715,4 +2720,8 @@ void
iscsi_scsi_cancel_all_tasks(struct iscsi_context *iscsi)
{
iscsi_cancel_pdus(iscsi);
if (iscsi->old_iscsi) {
iscsi_cancel_pdus(iscsi->old_iscsi);
}
}