diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-09 08:40:28 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-12 10:29:36 -0600 |
commit | 50b4aecfbbb09869db967e4a26212a47e10c0088 (patch) | |
tree | 11348e1e5960f45f23b5c4eaa9d687a1e0de3b6b /fs/block_dev.c | |
parent | b75f4aed88febe903bd40a6128b74edd2388417e (diff) | |
download | linux-50b4aecfbbb09869db967e4a26212a47e10c0088.tar.gz linux-50b4aecfbbb09869db967e4a26212a47e10c0088.tar.bz2 linux-50b4aecfbbb09869db967e4a26212a47e10c0088.zip |
block: remove GENHD_FL_UP
Just check inode_unhashed on the whole device bdev inode instead,
and provide a helper to check for that information.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210809064028.1198327-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index e1c14c2e0504..38a8b0e04a0c 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1218,7 +1218,7 @@ struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, void *holder) mutex_lock(&disk->open_mutex); ret = -ENXIO; - if (!(disk->flags & GENHD_FL_UP)) + if (!disk_live(disk)) goto abort_claiming; if (bdev_is_partition(bdev)) ret = blkdev_get_part(bdev, mode); |