[PATCH 02/12] target: remove transport_generic_process_write

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

 



Just call target_execute_cmd directly.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

---
 drivers/target/loopback/tcm_loop.c     |    2 +-
 drivers/target/sbp/sbp_target.c        |    3 +--
 drivers/target/target_core_transport.c |   15 +++------------
 drivers/usb/gadget/tcm_usb_gadget.c    |    4 ++--
 include/target/target_core_fabric.h    |    2 +-
 5 files changed, 8 insertions(+), 18 deletions(-)

Index: lio-core/drivers/target/loopback/tcm_loop.c
===================================================================
--- lio-core.orig/drivers/target/loopback/tcm_loop.c	2012-07-01 14:29:18.777595260 +0200
+++ lio-core/drivers/target/loopback/tcm_loop.c	2012-07-01 14:29:24.670928559 +0200
@@ -778,7 +778,7 @@ static int tcm_loop_write_pending(struct
 	 * We now tell TCM to add this WRITE CDB directly into the TCM storage
 	 * object execution queue.
 	 */
-	transport_generic_process_write(se_cmd);
+	target_execute_cmd(se_cmd);
 	return 0;
 }
 
Index: lio-core/drivers/target/sbp/sbp_target.c
===================================================================
--- lio-core.orig/drivers/target/sbp/sbp_target.c	2012-07-01 14:29:18.777595260 +0200
+++ lio-core/drivers/target/sbp/sbp_target.c	2012-07-01 14:29:24.674261892 +0200
@@ -1784,8 +1784,7 @@ static int sbp_write_pending(struct se_c
 		return ret;
 	}
 
-	transport_generic_process_write(se_cmd);
-
+	target_execute_cmd(se_cmd);
 	return 0;
 }
 
Index: lio-core/drivers/target/target_core_transport.c
===================================================================
--- lio-core.orig/drivers/target/target_core_transport.c	2012-07-01 14:29:20.174261918 +0200
+++ lio-core/drivers/target/target_core_transport.c	2012-07-01 14:29:24.674261892 +0200
@@ -1854,7 +1854,7 @@ static void __target_execute_cmd(struct
 	}
 }
 
-static void target_execute_cmd(struct se_cmd *cmd)
+void target_execute_cmd(struct se_cmd *cmd)
 {
 	struct se_device *dev = cmd->se_dev;
 
@@ -1944,6 +1944,7 @@ execute:
 	 */
 	__target_execute_cmd(cmd);
 }
+EXPORT_SYMBOL(target_execute_cmd);
 
 /*
  * Used to obtain Sense Data from underlying Linux/SCSI struct scsi_cmnd
@@ -2494,16 +2495,6 @@ out_fail:
 }
 EXPORT_SYMBOL(transport_generic_new_cmd);
 
-/*	transport_generic_process_write():
- *
- *
- */
-void transport_generic_process_write(struct se_cmd *cmd)
-{
-	target_execute_cmd(cmd);
-}
-EXPORT_SYMBOL(transport_generic_process_write);
-
 static void transport_write_pending_qf(struct se_cmd *cmd)
 {
 	int ret;
@@ -3315,7 +3306,7 @@ get_cmd:
 			}
 			break;
 		case TRANSPORT_PROCESS_WRITE:
-			transport_generic_process_write(cmd);
+			target_execute_cmd(cmd);
 			break;
 		case TRANSPORT_PROCESS_TMR:
 			transport_generic_do_tmr(cmd);
Index: lio-core/drivers/usb/gadget/tcm_usb_gadget.c
===================================================================
--- lio-core.orig/drivers/usb/gadget/tcm_usb_gadget.c	2012-07-01 14:29:18.777595260 +0200
+++ lio-core/drivers/usb/gadget/tcm_usb_gadget.c	2012-07-01 14:29:24.674261892 +0200
@@ -294,7 +294,7 @@ static int bot_send_write_request(struct
 		pr_err("%s(%d)\n", __func__, __LINE__);
 
 	wait_for_completion(&cmd->write_complete);
-	transport_generic_process_write(se_cmd);
+	target_execute_cmd(se_cmd);
 cleanup:
 	return ret;
 }
@@ -725,7 +725,7 @@ static int uasp_send_write_request(struc
 	}
 
 	wait_for_completion(&cmd->write_complete);
-	transport_generic_process_write(se_cmd);
+	target_execute_cmd(se_cmd);
 cleanup:
 	return ret;
 }
Index: lio-core/include/target/target_core_fabric.h
===================================================================
--- lio-core.orig/include/target/target_core_fabric.h	2012-07-01 14:29:18.777595260 +0200
+++ lio-core/include/target/target_core_fabric.h	2012-07-01 14:29:24.677595225 +0200
@@ -120,7 +120,7 @@ int	transport_generic_map_mem_to_cmd(str
 		struct scatterlist *, u32, struct scatterlist *, u32);
 int	transport_generic_new_cmd(struct se_cmd *);
 
-void	transport_generic_process_write(struct se_cmd *);
+void	target_execute_cmd(struct se_cmd *cmd);
 
 void	transport_generic_free_cmd(struct se_cmd *, int);
 

--
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