summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-03-29 10:51:42 +1100
committerNeilBrown <neilb@suse.de>2010-05-18 15:27:52 +1000
commit49ce6cea85fb8d25ee59486c919406e9cecf1762 (patch)
tree36ff1804090759c0b43593feb8880b15121d13e9 /drivers/md
parent490773268cf64f68da2470e07b52c7944da6312d (diff)
downloadlinux-49ce6cea85fb8d25ee59486c919406e9cecf1762.tar.bz2
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 <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-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 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;
}