aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2017-05-23 16:48:38 -0700
committerNicholas Bellinger <[email protected]>2017-07-06 22:58:03 -0700
commitaf90e84d1f535827f4c593436a807b1efa9f6f2b (patch)
tree5bc3d6a0369e780bad7b6fe3d882b1b9148ef610
parente3eac12442c2678d64b655e9768bda1be65e0b68 (diff)
xen/scsiback: Make TMF processing slightly faster
Target drivers must guarantee that struct se_cmd and struct se_tmr_req exist as long as target_tmr_work() is in progress. Since the last access by the LIO core is a call to .check_stop_free() and since the Xen scsiback .check_stop_free() drops a reference to the TMF, it is already guaranteed that the struct se_cmd that corresponds to the TMF exists as long as target_tmr_work() is in progress. Hence change the second argument of transport_generic_free_cmd() from 1 into 0. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: David Disseldorp <[email protected]> Cc: [email protected] Signed-off-by: Nicholas Bellinger <[email protected]>
-rw-r--r--drivers/xen/xen-scsiback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index 4cb33a0916a8..7bc88fd43cfc 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -614,7 +614,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
SUCCESS : FAILED;
scsiback_do_resp_with_sense(NULL, err, 0, pending_req);
- transport_generic_free_cmd(&pending_req->se_cmd, 1);
+ transport_generic_free_cmd(&pending_req->se_cmd, 0);
return;
err: