Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initiator: Avoid stopping one connection more than one time
Once receive ISCSI_KEVENT_UNBIND_SESSION, ctldev_handle() would trigger an EV_CONN_STOP event, this event would calling iscsi_stop() to perform connection stop operations. While we can not guarantee only one ISCSI_KEVENT_UNBIND_SESSION is received(actually in current mainline kernel design, kernel would always send ISCSI_KEVENT_UNBIND_SESSION twice). So we must check connection's state at the begining of iscsi_stop() to avoid the stop operations performed more than one time. This issue only happened with async destroy session. Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
- Loading branch information