diff options
author | Christoph Hellwig <hch@lst.de> | 2022-05-23 11:38:13 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-24 06:24:10 +0300 |
commit | 7274ce0558adb4b9b1f5c5b613fb4fe331c18911 (patch) | |
tree | 6f8b8d1ea15dade400bf69e77e1cdc4c5fda6540 /drivers/scsi/sd.c | |
parent | 476e45923b5df19534178d0ed5c87c517dd6f669 (diff) | |
download | linux-7274ce0558adb4b9b1f5c5b613fb4fe331c18911.tar.xz |
scsi: 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.
Link: https://lore.kernel.org/r/20220523083813.227935-1-hch@lst.de
Fixes: 03252259e18e ("scsi: sd: Clean up gendisk if device_add_disk() failed")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index c583301ff4ec..a8f61b6ea479 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3523,7 +3523,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; } |