diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-03-17 20:40:23 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-03-17 21:07:27 -0400 |
commit | ee9b866a3696ae434418348e2f499c41841366d4 (patch) | |
tree | d648749dbee6c5fd1104ddbc92cf897502af540a /drivers/target | |
parent | f760903ae512c7851b619be1742ae1581145a878 (diff) |
loopback: Fix transport_generic_allocate_tasks error handling
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 16786454acec0e0e55e32d508b3058b32c1f23f3
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>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 22f4fe77237b..a9b4eeefe9fc 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -233,8 +233,7 @@ static void tcm_loop_submission_work(struct work_struct *work) | |||
233 | TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); | 233 | TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); |
234 | transport_generic_free_cmd(se_cmd, 0); | 234 | transport_generic_free_cmd(se_cmd, 0); |
235 | return; | 235 | return; |
236 | } | 236 | } else if (ret < 0) { |
237 | if (ret == -EINVAL) { | ||
238 | if (se_cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT) | 237 | if (se_cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT) |
239 | tcm_loop_queue_status(se_cmd); | 238 | tcm_loop_queue_status(se_cmd); |
240 | else | 239 | else |