sd: don't call blk_cleanup_disk in sd_probe
PATCH 1/1 sd: don't call blk_cleanup_disk in sd_probe
In SCSI the midlayer has ownership of the request_queue, so on probe failure we must only put the gendisk, but leave the request_queue alone.
Fixes 03252259e18e ("scsi: sd: Clean up gendisk if device_add_disk() failed")
Signed-off-by Christoph Hellwig <[email protected]>
--- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sd.c +1 -1
@@ -3473,7 +3473,7 @@ static int sd_probe(struct device *dev) error =device_add_disk (dev, gd,NULL );if (error) {put_device (&sdkp->disk_dev); -blk_cleanup_disk (gd); +put_disk (gd); goto out; }
Signature · 1 line
2.30.2
Martin K. Petersen
AppliedChristoph,
Quoted 2 lines
In SCSI the midlayer has ownership of the
request_queue, so on probe failure we must only put the gendisk, but leave therequest_queuealone.
Applied to 5.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 4 lines · Christoph Hellwig
In SCSI the midlayer has ownership of the
request_queue, so on probe failure we must only put the gendisk, but leave therequest_queuealone.
Applied to 5.19/scsi-queue, thanks!
[1/1] sd: don't call blk_cleanup_disk in sd_probe
https://git.kernel.org/mkp/scsi/c/7274ce0558ad
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering