scsi: iscsi: Fix iSCSI cls conn state
authorMike Christie <michael.christie@oracle.com>
Tue, 6 Apr 2021 17:17:46 +0000 (12:17 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 8 Apr 2021 01:30:59 +0000 (21:30 -0400)
commit0dcf8febcb7b9d42bec98bc068e01d1a6ea578b8
treecaed04189d781b756376f8a7e33cbc79f43e8aee
parent5cd0f6f57639c5afbb36100c69281fee82c95ee7
scsi: iscsi: Fix iSCSI cls conn state

In commit 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and
sync thread") I missed that libiscsi was now setting the iSCSI class state,
and that patch ended up resetting the state during conn stoppage and using
the wrong state value during ep_disconnect. This patch moves the setting of
the class state to the class module and then fixes the two issues above.

Link: https://lore.kernel.org/r/20210406171746.5016-1-michael.christie@oracle.com
Fixes: 9e67600ed6b8 ("scsi: iscsi: Fix race condition between login and sync thread")
Cc: Gulam Mohamed <gulam.mohamed@oracle.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c
drivers/scsi/scsi_transport_iscsi.c