Thread (31 messages) 31 messages, 2 authors, 2021-08-30
STALE1769d
Revisions (5)
  1. v1 current
  2. v2 [diff vs current]
  3. v1 [diff vs current]
  4. v3 [diff vs current]
  5. v4 [diff vs current]

[PATCH 01/10] scsi/sd: use blk_cleanup_queue() insted of put_disk()

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-08-23 20:30:39
Also in: dm-devel, linux-mmc, linux-nvme, linux-scsi, lkml
Subsystem: scsi subsystem, the rest · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

The single put_disk() is useful if you know you're not doing
a cleanup after add_disk(), but since we want to add support
for that, just use the normal form of blk_cleanup_disk() to
cleanup the queue and put the disk.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 610ebba0d66e..7d5217905374 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3508,7 +3508,7 @@ static int sd_probe(struct device *dev)
  out_free_index:
 	ida_free(&sd_index_ida, index);
  out_put:
-	put_disk(gd);
+	blk_cleanup_disk(gd);
  out_free:
 	sd_zbc_release_disk(sdkp);
 	kfree(sdkp);
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help