[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210715203025.2018218-4-mcgrof@kernel.org>
Date: Thu, 15 Jul 2021 13:30:23 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: axboe@...nel.dk
Cc: hare@...e.de, bvanassche@....org, ming.lei@...hat.com,
hch@...radead.org, jack@...e.cz, osandov@...com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: [RFC 3/5] block/sx8: remove the GENHD_FL_UP check before del_gendisk()
This is no longer required, given the block layer adds a flag
now for us on a disk once add_disk() completes successfully,
and so del_gendisk() will only really run if that flag is set.
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
---
drivers/block/sx8.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 7b54353ee92b..e4dfee5acf08 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1373,8 +1373,7 @@ static void carm_free_disk(struct carm_host *host, unsigned int port_no)
if (!disk)
return;
- if (disk->flags & GENHD_FL_UP)
- del_gendisk(disk);
+ del_gendisk(disk);
blk_cleanup_disk(disk);
}
--
2.27.0
Powered by blists - more mailing lists