Commit af90e84d authored by Bart Van Assche's avatar Bart Van Assche Committed by Nicholas Bellinger

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: default avatarBart Van Assche <>
Reviewed-by: default avatarJuergen Gross <>
Cc: Christoph Hellwig <>
Cc: Hannes Reinecke <>
Cc: David Disseldorp <>
Signed-off-by: default avatarNicholas Bellinger <>
parent e3eac124
......@@ -614,7 +614,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req,
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);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment