[SCSI] sd: fix bug in SCSI async probing
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 26 May 2009 20:35:48 +0000 (20:35 +0000)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 8 Jun 2009 18:00:13 +0000 (13:00 -0500)
commit601e7638254c118fca135af9b1a9f35061420f62
tree61b883be6901e4c994c5b472959e91ebdb267d6f
parent91bc31fb3bae4e55832c7c39d4f9c193285e6ab2
[SCSI] sd: fix bug in SCSI async probing

The async split up of probing in sd.c created a potential failure case where
something goes wrong with device_add(), but which we don't recover properly.
Since, in general, asynchronous error handling is hard, move the device_add()
into the asynchronous path (it should be fast) and make sure all the deferred
processing cannot fail.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sd.c