diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-10 09:57:14 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-10 09:57:14 +0200 |
commit | 099b4d3b473db012a55ce6bec9ef594d0508e782 (patch) | |
tree | a55980b995612c188d02bd6f47b93f1e17733572 /fs/partitions/check.c | |
parent | Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes (diff) | |
parent | davinci: make PCM platform devices static (diff) | |
download | linux-099b4d3b473db012a55ce6bec9ef594d0508e782.tar.xz linux-099b4d3b473db012a55ce6bec9ef594d0508e782.zip |
Merge branch 'davinci-next' of git://gitorious.org/linux-davinci/linux-davinci into fixes
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index f82e762eeca2..d545e97d99c3 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -255,13 +255,7 @@ ssize_t part_discard_alignment_show(struct device *dev, struct device_attribute *attr, char *buf) { struct hd_struct *p = dev_to_part(dev); - struct gendisk *disk = dev_to_disk(dev); - unsigned int alignment = 0; - - if (disk->queue) - alignment = queue_limit_discard_alignment(&disk->queue->limits, - p->start_sect); - return sprintf(buf, "%u\n", alignment); + return sprintf(buf, "%u\n", p->discard_alignment); } ssize_t part_stat_show(struct device *dev, @@ -455,6 +449,8 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno, p->start_sect = start; p->alignment_offset = queue_limit_alignment_offset(&disk->queue->limits, start); + p->discard_alignment = + queue_limit_discard_alignment(&disk->queue->limits, start); p->nr_sects = len; p->partno = partno; p->policy = get_disk_ro(disk); |