loopback: Fix transport_generic_allocate_tasks error handling
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 18 Mar 2012 00:40:23 +0000 (17:40 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 18 Mar 2012 01:07:27 +0000 (18:07 -0700)
commitee9b866a3696ae434418348e2f499c41841366d4
treed648749dbee6c5fd1104ddbc92cf897502af540a
parentf760903ae512c7851b619be1742ae1581145a878
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>
drivers/target/loopback/tcm_loop.c