aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/sx8.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-09 08:40:25 +0200
committerJens Axboe <axboe@kernel.dk>2021-08-12 10:29:36 -0600
commit4f9e14aecfbdc6b762d5122489604858c5fec5e7 (patch)
tree1198bda3fc6b31359dac476124254d820784c304 /drivers/block/sx8.c
parentnvme: replace the GENHD_FL_UP check in nvme_mpath_shutdown_disk (diff)
downloadlinux-dev-4f9e14aecfbdc6b762d5122489604858c5fec5e7.tar.xz
linux-dev-4f9e14aecfbdc6b762d5122489604858c5fec5e7.zip
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/block/sx8.c')
-rw-r--r--drivers/block/sx8.c2
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);
}