]> git.baikalelectronics.ru Git - kernel.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)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 11 Jan 2013 05:00:36 +0000 (21:00 -0800)
commit5aeb5c4209d45e77c8dff174ffc7ca7df217651e
treeacd4e983a76dbcd000a58e239d61ad50ddf90cd7
parent4dfe4795c4a80259cc6a37bb524f5cd5b9a7c308
target: Release se_cmd when LUN lookup fails for TMR

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>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c