From e6c4219b54ac9d0bd348ea59e606303f9aef1784 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 10 Oct 2012 16:52:48 -0400 Subject: [PATCH] pscsi: fix REPORT LUNS handling We need to assign spc_emulate_report_luns to the execute_cmd callback and not execute it directly. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_pscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index c3bcc17575d0..dd6ac7c380c9 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1001,7 +1001,8 @@ static int pscsi_parse_cdb(struct se_cmd *cmd) */ switch (cdb[0]) { case REPORT_LUNS: - return spc_emulate_report_luns(cmd); + cmd->execute_cmd = spc_emulate_report_luns; + return 0; case READ_6: case READ_10: case READ_12: -- 2.34.1