]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
xen/scsiback: Make TMF processing slightly faster
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 23 May 2017 23:48:38 +0000 (16:48 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 7 Jul 2017 05:58:03 +0000 (22:58 -0700)
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 <bart.vanassche@sandisk.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: David Disseldorp <ddiss@suse.de>
Cc: xen-devel@lists.xenproject.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/xen/xen-scsiback.c

index 4cb33a0916a860282e0ae5b2a37755e9527874c5..7bc88fd43cfc84d05873893ef4ddec8307e76c2a 100644 (file)
@@ -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: