Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Roland Dreier and committed by
Nicholas Bellinger
5a3b6fc0 72b59d6e

+2
+2
drivers/target/target_core_transport.c
··· 1393 1393 1394 1394 se_cmd->se_tmr_req->response = TMR_LUN_DOES_NOT_EXIST; 1395 1395 se_cmd->se_tfo->queue_tm_rsp(se_cmd); 1396 + 1397 + transport_cmd_check_stop_to_fabric(se_cmd); 1396 1398 } 1397 1399 1398 1400 /**