Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49ce6cea authored by NeilBrown's avatar NeilBrown
Browse files

md: don't reference gendisk in getgeo



Using ->array_sectors rather than get_capacity() is more
direct and is a step towards relaxing the tight connection
between mddev and gendisk.

Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 49077326
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5556,7 +5556,7 @@ static int md_getgeo(struct block_device *bdev, struct hd_geometry *geo)

	geo->heads = 2;
	geo->sectors = 4;
	geo->cylinders = get_capacity(mddev->gendisk) / 8;
	geo->cylinders = mddev->array_sectors / 8;
	return 0;
}