SCSI: sd: fix bug in SCSI async probing
commit65a11d230e61e2d760ee114781235d25725fd9d9
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 26 May 2009 20:35:48 +0000 (26 20:35 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 17:45:28 +0000 (15 10:45 -0700)
tree0f41385e37847b242efe574db4f9417aa1fb40c4
parent354c51ed795e4f0a8301a3815b963845d6d6131c
SCSI: sd: fix bug in SCSI async probing

commit 601e7638254c118fca135af9b1a9f35061420f62 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/sd.c