diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-09 08:40:25 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-12 10:29:36 -0600 |
commit | 4f9e14aecfbdc6b762d5122489604858c5fec5e7 (patch) | |
tree | 1198bda3fc6b31359dac476124254d820784c304 /drivers | |
parent | 916a470da02f909cabb65337f65438b8bc3965b2 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/sx8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 7b54353ee92b..420cd952ddc4 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c @@ -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); } |