[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210823202930.137278-2-mcgrof@kernel.org>
Date: Mon, 23 Aug 2021 13:29:21 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: axboe@...nel.dk, martin.petersen@...cle.com, jejb@...ux.ibm.com,
kbusch@...nel.org, sagi@...mberg.me, adrian.hunter@...el.com,
beanhuo@...ron.com, ulf.hansson@...aro.org, avri.altman@....com,
swboyd@...omium.org, agk@...hat.com, snitzer@...hat.com,
josef@...icpanda.com
Cc: hch@...radead.org, hare@...e.de, bvanassche@....org,
ming.lei@...hat.com, linux-scsi@...r.kernel.org,
linux-nvme@...ts.infradead.org, linux-mmc@...r.kernel.org,
dm-devel@...hat.com, nbd@...er.debian.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: [PATCH 01/10] scsi/sd: use blk_cleanup_queue() insted of put_disk()
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@...nel.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
Powered by blists - more mailing lists