From: NeilBrown Date: Sun, 28 Mar 2010 23:51:42 +0000 (+1100) Subject: md: don't reference gendisk in getgeo X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49ce6cea85fb8d25ee59486c919406e9cecf1762;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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: NeilBrown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 117663d2a4e5..69f2a8e6ccdf 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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; }