[PATCH 13/20] target: Remove second argument of transport_check_aborted_status()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Due to the previous patch the second argument of
transport_check_aborted_status() is ignored and that function does
no longer have any side effect. Hence remove the second argument of
that function and remove all calls of that function that do not check
the return value.

Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Hannes Reinecke <hare@xxxxxxx>
Cc: Andy Grover <agrover@xxxxxxxxxx>
Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c    | 4 ++--
 drivers/target/iscsi/iscsi_target.c      | 7 +------
 drivers/target/iscsi/iscsi_target_erl1.c | 8 +++-----
 drivers/target/target_core_transport.c   | 4 ++--
 include/target/target_core_fabric.h      | 2 +-
 5 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 231d29c..4d2be30 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -1347,7 +1347,7 @@ static int srpt_abort_cmd(struct srpt_send_ioctx *ioctx)
 		 * Do nothing - defer abort processing until
 		 * srpt_queue_response() is invoked.
 		 */
-		WARN_ON(!transport_check_aborted_status(&ioctx->cmd, false));
+		WARN_ON(!transport_check_aborted_status(&ioctx->cmd));
 		break;
 	case SRPT_STATE_NEED_DATA:
 		/* DMA_TO_DEVICE (write) - RDMA read error. */
@@ -3031,7 +3031,7 @@ static void srpt_queue_response(struct se_cmd *cmd)
 	}
 	spin_unlock_irqrestore(&ioctx->spinlock, flags);
 
-	if (unlikely(transport_check_aborted_status(&ioctx->cmd, false)
+	if (unlikely(transport_check_aborted_status(&ioctx->cmd)
 		     || WARN_ON_ONCE(state == SRPT_STATE_CMD_RSP_SENT))) {
 		atomic_inc(&ch->req_lim_delta);
 		srpt_abort_cmd(ioctx);
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index a81c0e5..acd8d48 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1338,8 +1338,6 @@ iscsit_check_dataout_hdr(struct iscsi_conn *conn, unsigned char *buf,
 			if (hdr->flags & ISCSI_FLAG_CMD_FINAL)
 				iscsit_stop_dataout_timer(cmd);
 
-			transport_check_aborted_status(se_cmd,
-					(hdr->flags & ISCSI_FLAG_CMD_FINAL));
 			return iscsit_dump_data_payload(conn, payload_length, 1);
 		}
 	} else {
@@ -1355,11 +1353,8 @@ iscsit_check_dataout_hdr(struct iscsi_conn *conn, unsigned char *buf,
 		 */
 		if (se_cmd->transport_state & CMD_T_ABORTED) {
 			if (hdr->flags & ISCSI_FLAG_CMD_FINAL)
-				if (--cmd->outstanding_r2ts < 1) {
+				if (--cmd->outstanding_r2ts < 1)
 					iscsit_stop_dataout_timer(cmd);
-					transport_check_aborted_status(
-							se_cmd, 1);
-				}
 
 			return iscsit_dump_data_payload(conn, payload_length, 1);
 		}
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index 9214c9d..f408621 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -950,8 +950,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
 			 * should be sent after unsolicited data out with
 			 * ISCSI_FLAG_CMD_FINAL set in iscsi_handle_data_out()
 			 */
-			if (transport_check_aborted_status(se_cmd,
-					(cmd->unsolicited_data == 0)) != 0)
+			if (transport_check_aborted_status(se_cmd) != 0)
 				return 0;
 			/*
 			 * Otherwise send CHECK_CONDITION and sense for
@@ -979,8 +978,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
 				 * WRITEs if no more unsolicitied data is
 				 * expected.
 				 */
-				if (transport_check_aborted_status(se_cmd, 1)
-						!= 0)
+				if (transport_check_aborted_status(se_cmd) != 0)
 					return 0;
 
 				iscsit_set_dataout_sequence_values(cmd);
@@ -999,7 +997,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
 			 * Send the delayed TASK_ABORTED status for WRITEs if
 			 * no more nsolicitied data is expected.
 			 */
-			if (transport_check_aborted_status(se_cmd, 1) != 0)
+			if (transport_check_aborted_status(se_cmd) != 0)
 				return 0;
 
 			iscsit_set_unsoliticed_dataout(cmd);
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index a0b0673..3347cf0 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1832,7 +1832,7 @@ void target_execute_cmd(struct se_cmd *cmd)
 	/*
 	 * If the received CDB has aleady been aborted stop processing it here.
 	 */
-	if (transport_check_aborted_status(cmd, 1))
+	if (transport_check_aborted_status(cmd))
 		return;
 
 	/*
@@ -2812,7 +2812,7 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
 }
 EXPORT_SYMBOL(transport_send_check_condition_and_sense);
 
-bool transport_check_aborted_status(struct se_cmd *cmd, int send_status)
+bool transport_check_aborted_status(struct se_cmd *cmd)
 {
 	return cmd->transport_state & CMD_T_ABORTED;
 }
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index cc53a52..98a362d 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -149,7 +149,7 @@ void	target_execute_cmd(struct se_cmd *cmd);
 int	transport_generic_free_cmd(struct se_cmd *, int);
 
 bool	transport_wait_for_tasks(struct se_cmd *);
-bool	transport_check_aborted_status(struct se_cmd *, int);
+bool	transport_check_aborted_status(struct se_cmd *);
 int	transport_send_check_condition_and_sense(struct se_cmd *,
 		sense_reason_t, int);
 int	target_get_sess_cmd(struct se_cmd *, bool);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux