summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-21 09:19:45 +0200
committerJens Axboe <axboe@kernel.dk>2020-09-23 10:43:18 -0600
commit38430f0876fa8b9549ec434f569dce03e057c076 (patch)
treeb8137369a29bfc6158d781ad1e4897cbd6a2062f /block
parent07d098e6bbad04030dab5b3e64149601fcb063ce (diff)
block: move the NEED_PART_SCAN flag to struct gendisk
We can only scan for partitions on the whole disk, so move the flag from struct block_device to struct gendisk. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 9d060e79eb31..7b56203c90a3 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -731,7 +731,7 @@ static void register_disk(struct device *parent, struct gendisk *disk,
if (!bdev)
goto exit;
- set_bit(BDEV_NEED_PART_SCAN, &bdev->bd_flags);
+ set_bit(GD_NEED_PART_SCAN, &disk->state);
err = blkdev_get(bdev, FMODE_READ, NULL);
if (err < 0)
goto exit;
@@ -2112,7 +2112,7 @@ bool bdev_check_media_change(struct block_device *bdev)
if (__invalidate_device(bdev, true))
pr_warn("VFS: busy inodes on changed media %s\n",
bdev->bd_disk->disk_name);
- set_bit(BDEV_NEED_PART_SCAN, &bdev->bd_flags);
+ set_bit(GD_NEED_PART_SCAN, &bdev->bd_disk->state);
return true;
}
EXPORT_SYMBOL(bdev_check_media_change);