Commit 4f9e14ae authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210809064028.1198327-6-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 916a470d
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment