diff mbox series

[22/40] scsi: libiscsi: remove ISCSI_TASK_ABRT_SESS_RECOV

Message ID 20210403232333.212927-23-michael.christie@oracle.com
State New
Headers show
Series iscsi lock and refcount fix ups | expand

Commit Message

Mike Christie April 3, 2021, 11:23 p.m. UTC
The next patches simplfy the task state, so we can more easily use it to
detect if a command completed without the back lock becuase that is being
removed. This patch removes ISCSI_TASK_ABRT_SESS_RECOV since no one checks
for it and only cares if the command has completed.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
 drivers/scsi/libiscsi.c | 5 ++---
 include/scsi/libiscsi.h | 1 -
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 46ab51e5a87b..e2f3217afdc9 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -517,7 +517,6 @@  static void iscsi_finish_task(struct iscsi_task *task, int state)
 			  task->itt, task->state, task->sc);
 	if (task->state == ISCSI_TASK_COMPLETED ||
 	    task->state == ISCSI_TASK_ABRT_TMF ||
-	    task->state == ISCSI_TASK_ABRT_SESS_RECOV ||
 	    task->state == ISCSI_TASK_REQUEUE_SCSIQ)
 		return;
 	WARN_ON_ONCE(task->state == ISCSI_TASK_FREE);
@@ -614,7 +613,7 @@  static void fail_scsi_task(struct iscsi_task *task, int err)
 		/* it was never sent so just complete like normal */
 		state = ISCSI_TASK_COMPLETED;
 	} else if (err == DID_TRANSPORT_DISRUPTED)
-		state = ISCSI_TASK_ABRT_SESS_RECOV;
+		state = ISCSI_TASK_COMPLETED;
 	else
 		state = ISCSI_TASK_ABRT_TMF;
 
@@ -3310,7 +3309,7 @@  fail_mgmt_tasks(struct iscsi_session *session, struct iscsi_conn *conn)
 			continue;
 		}
 
-		state = ISCSI_TASK_ABRT_SESS_RECOV;
+		state = ISCSI_TASK_COMPLETED;
 		if (task->state == ISCSI_TASK_PENDING)
 			state = ISCSI_TASK_COMPLETED;
 		iscsi_finish_task(task, state);
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 7a78f8c5d670..589acc1d420d 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -97,7 +97,6 @@  enum {
 	ISCSI_TASK_PENDING,
 	ISCSI_TASK_RUNNING,
 	ISCSI_TASK_ABRT_TMF,		/* aborted due to TMF */
-	ISCSI_TASK_ABRT_SESS_RECOV,	/* aborted due to session recovery */
 	ISCSI_TASK_REQUEUE_SCSIQ,	/* qcmd requeueing to scsi-ml */
 };