mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
sx8: use the internal state machine to check if del_gendisk needs to be called
Remove usage of the block layer internal GENHD_FL_UP by just looking at the host state. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210809064028.1198327-6-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
916a470da0
commit
4f9e14aecf
@ -1373,7 +1373,7 @@ static void carm_free_disk(struct carm_host *host, unsigned int port_no)
|
||||
if (!disk)
|
||||
return;
|
||||
|
||||
if (disk->flags & GENHD_FL_UP)
|
||||
if (host->state > HST_DEV_ACTIVATE)
|
||||
del_gendisk(disk);
|
||||
blk_cleanup_disk(disk);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user