Message ID | 20220523083813.227935-1-hch@lst.de |
---|---|
State | New |
Headers | show |
Series | sd: don't call blk_cleanup_disk in sd_probe | expand |
Christoph, > 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. Applied to 5.19/scsi-staging, thanks!
On Mon, 23 May 2022 10:38:13 +0200, Christoph Hellwig wrote: > 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. > > 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
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9694e2cfaf9a6..986de990cf0f7 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -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; }
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 <hch@lst.de> --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)