[RFC 3/5] block/sx8: remove the GENHD_FL_UP check before del_gendisk()
From: Luis Chamberlain
Date: Thu Jul 15 2021 - 16:30:48 EST
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@xxxxxxxxxx>
---
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