scsi-disk: Clear aiocb on read completion
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 4 May 2010 12:21:00 +0000 (14:21 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 10 May 2010 16:36:03 +0000 (11:36 -0500)
commit3e94cb020444ed201cfe6210f0de9953143dc74b
tree38f341d02247cd33825ab8c448437fe3ada4de62
parente9447f35718439c1affdee3ef69b2fee50c8106c
scsi-disk: Clear aiocb on read completion

Once the I/O completion callback returned, aiocb will be released by the
controller. So we have to clear the reference not only in
scsi_write_complete, but also in scsi_read_complete. Otherwise we risk
inconsistencies when a reset hits us before the related request is
released.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/scsi-disk.c