Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287366
b: refs/heads/master
c: 735703c
h: refs/heads/master
v: v3
  • Loading branch information
Nicholas Bellinger committed Feb 7, 2012
1 parent b740605 commit 2597a78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1edcdb497ef418122cd4f98e157660cf594b345a
refs/heads/master: 735703cac08f34a197e1c6331ca9adc8a52d6046
18 changes: 10 additions & 8 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1690,15 +1690,21 @@ void target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess,
/*
* Locate se_lun pointer and attach it to struct se_cmd
*/
if (transport_lookup_cmd_lun(se_cmd, unpacked_lun) < 0)
goto out_check_cond;
if (transport_lookup_cmd_lun(se_cmd, unpacked_lun) < 0) {
transport_send_check_condition_and_sense(se_cmd,
se_cmd->scsi_sense_reason, 0);
target_put_sess_cmd(se_sess, se_cmd);
return;
}
/*
* Sanitize CDBs via transport_generic_cmd_sequencer() and
* allocate the necessary tasks to complete the received CDB+data
*/
rc = transport_generic_allocate_tasks(se_cmd, cdb);
if (rc != 0)
goto out_check_cond;
if (rc != 0) {
transport_generic_request_failure(se_cmd);
return;
}
/*
* Dispatch se_cmd descriptor to se_lun->lun_se_dev backend
* for immediate execution of READs, otherwise wait for
Expand All @@ -1707,10 +1713,6 @@ void target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess,
*/
transport_handle_cdb_direct(se_cmd);
return;

out_check_cond:
transport_send_check_condition_and_sense(se_cmd,
se_cmd->scsi_sense_reason, 0);
}
EXPORT_SYMBOL(target_submit_cmd);

Expand Down

0 comments on commit 2597a78

Please sign in to comment.