aboutsummaryrefslogtreecommitdiff
path: root/drivers/target/target_core_pscsi.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-10-07 10:55:52 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-11-06 20:55:44 -0800
commit8de530a523fd3cc46b5d8d96f3016298c5c808ac (patch)
tree1a1fee222c4e5c834023d871363aea9ee49cc41b /drivers/target/target_core_pscsi.c
parentd1b1f8053401aaf1dfe636afa6d361301e3ae8b7 (diff)
target/pscsi: call spc_emulate_report_luns directly
No need to indirect through spc_parse_cdb if we only ever call it for REPORT LUNS emulation. (nab: Add missing EXPORT_SYMBOL for spc_emulate_report_luns) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_pscsi.c')
-rw-r--r--drivers/target/target_core_pscsi.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index b2965084eb4..dc10e29934d 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -985,8 +985,6 @@ static inline void pscsi_clear_cdb_lun(unsigned char *cdb)
static int pscsi_parse_cdb(struct se_cmd *cmd)
{
unsigned char *cdb = cmd->t_task_cdb;
- unsigned int dummy_size;
- int ret;
if (cmd->se_cmd_flags & SCF_BIDI) {
cmd->se_cmd_flags |= SCF_SCSI_CDB_EXCEPTION;
@@ -1003,10 +1001,7 @@ static int pscsi_parse_cdb(struct se_cmd *cmd)
*/
switch (cdb[0]) {
case REPORT_LUNS:
- ret = spc_parse_cdb(cmd, &dummy_size);
- if (ret)
- return ret;
- break;
+ return spc_emulate_report_luns(cmd);
case READ_6:
case READ_10:
case READ_12:
@@ -1020,10 +1015,8 @@ static int pscsi_parse_cdb(struct se_cmd *cmd)
/* FALLTHROUGH*/
default:
cmd->execute_cmd = pscsi_execute_cmd;
- break;
+ return 0;
}
-
- return 0;
}
static int pscsi_execute_cmd(struct se_cmd *cmd)