aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-03 07:40:59 +0200
committerJens Axboe <axboe@kernel.dk>2020-09-25 08:18:57 -0600
commit4245e52d255418278fc4a5eec7425ad0bfeebd31 (patch)
tree171310a7fb259fa950263f164144a695bffaed2e /drivers/md/md.c
parentmd: compare bd_disk instead of bd_contains (diff)
downloadlinux-dev-4245e52d255418278fc4a5eec7425ad0bfeebd31.tar.xz
linux-dev-4245e52d255418278fc4a5eec7425ad0bfeebd31.zip
md: don't detour through bd_contains for the gendisk
bd_disk is set on all block devices, including those for partitions. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Song Liu <song@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 09ed6d0c7dbe..de8419b7ae98 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8444,7 +8444,7 @@ static int is_mddev_idle(struct mddev *mddev, int init)
idle = 1;
rcu_read_lock();
rdev_for_each_rcu(rdev, mddev) {
- struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
+ struct gendisk *disk = rdev->bdev->bd_disk;
curr_events = (int)part_stat_read_accum(&disk->part0, sectors) -
atomic_read(&disk->sync_io);
/* sync IO will cause sync_io to increase before the disk_stats