]> git.karo-electronics.de Git - karo-tx-linux.git/commit
target: Release se_cmd when LUN lookup fails for TMR
authorRoland Dreier <roland@purestorage.com>
Wed, 2 Jan 2013 20:47:59 +0000 (12:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jan 2013 19:44:33 +0000 (11:44 -0800)
commitc67507852d0777a8e616fb7c40da71cc40c328b3
treea9b3a8e06742ea34734dd5911b6116c5cb851cf9
parentf52375e9fcb897c1b5c1741b0531debd617a4a67
target: Release se_cmd when LUN lookup fails for TMR

commit 5a3b6fc0092c5f8dee7820064ee54d2631d48573 upstream.

When transport_lookup_tmr_lun() fails and we return a task management
response from target_complete_tmr_failure(), we need to call
transport_cmd_check_stop_to_fabric() to release the last ref to the
cmd after calling se_tfo->queue_tm_rsp(), or else we will never remove
the failed TMR from the session command list (and we'll end up waiting
forever when trying to tear down the session).

(nab: Fix minor compile breakage)

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_transport.c