Skip to content

Commit

Permalink
pscsi: fix REPORT LUNS handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Nicholas Bellinger committed Nov 7, 2012
1 parent ecf0dd6 commit e6c4219
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/target/target_core_pscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e6c4219

Please sign in to comment.