pscsi: fix REPORT LUNS handling
authorChristoph Hellwig <hch@infradead.org>
Wed, 10 Oct 2012 20:52:48 +0000 (16:52 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 7 Nov 2012 04:55:45 +0000 (20:55 -0800)
We need to assign spc_emulate_report_luns to the execute_cmd callback
and not execute it directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_pscsi.c

index c3bcc17575d020f7d6e3d054fc3c40562b486b5a..dd6ac7c380c9cbb227c1d6a64d8f7c3933f7b56e 100644 (file)
@@ -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: