xen/scsifront: don't request a slot on the ring until request is ready
authorJuergen Gross <jgross@suse.com>
Fri, 2 Dec 2016 06:15:45 +0000 (07:15 +0100)
committerJuergen Gross <jgross@suse.com>
Fri, 9 Dec 2016 09:59:13 +0000 (10:59 +0100)
commit3da96be58f2c8aaa86cfe78b16f837e610dfcfe2
treeadbccc218d18d3473e39f121c97442f2f3a5ff67
parent738662c35c491fc360bb6adcb8a0db88d87b5d88
xen/scsifront: don't request a slot on the ring until request is ready

Instead of requesting a new slot on the ring to the backend early, do
so only after all has been setup for the request to be sent. This
makes error handling easier as we don't need to undo the request id
allocation and ring slot allocation.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/scsi/xen-scsifront.c