Skip to content

Commit

Permalink
loopback: Fix transport_generic_allocate_tasks error handling
Browse files Browse the repository at this point in the history
This patch addresses a tcm_loop bug with transport_generic_allocate_tasks()
return checking in tcm_loop_submission_work() where other non zero return
codes (including -EBUSY for reservation conflicts) are incorrectly falling
through to transport_generic_map_mem_to_cmd() -> transport_handle_cdb_direct().

This bug was introduced into target-pending/for-next-merge with the following
for-3.4 commit:

commit 1678645
Author: Christoph Hellwig <hch@infradead.org>
Date:   Thu Feb 2 17:04:42 2012 -0500

    tcm_loop: switch to using transport_handle_cdb_direct

Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Mar 18, 2012
1 parent f760903 commit ee9b866
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/target/loopback/tcm_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ static void tcm_loop_submission_work(struct work_struct *work)
TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0);
transport_generic_free_cmd(se_cmd, 0);
return;
}
if (ret == -EINVAL) {
} else if (ret < 0) {
if (se_cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT)
tcm_loop_queue_status(se_cmd);
else
Expand Down

0 comments on commit ee9b866

Please sign in to comment.