diff options
-rw-r--r-- | fs/partitions/check.c | 9 | ||||
-rw-r--r-- | include/linux/genhd.h | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index d545e97d99c3..b7e16bccd5e5 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -255,7 +255,12 @@ ssize_t part_discard_alignment_show(struct device *dev, | |||
255 | struct device_attribute *attr, char *buf) | 255 | struct device_attribute *attr, char *buf) |
256 | { | 256 | { |
257 | struct hd_struct *p = dev_to_part(dev); | 257 | struct hd_struct *p = dev_to_part(dev); |
258 | return sprintf(buf, "%u\n", p->discard_alignment); | 258 | struct gendisk *disk = dev_to_disk(dev); |
259 | |||
260 | return sprintf(buf, "%u\n", | ||
261 | (unsigned long long)queue_limit_discard_alignment( | ||
262 | &disk->queue->limits, | ||
263 | p->start_sect)); | ||
259 | } | 264 | } |
260 | 265 | ||
261 | ssize_t part_stat_show(struct device *dev, | 266 | ssize_t part_stat_show(struct device *dev, |
@@ -449,8 +454,6 @@ struct hd_struct *add_partition(struct gendisk *disk, int partno, | |||
449 | p->start_sect = start; | 454 | p->start_sect = start; |
450 | p->alignment_offset = | 455 | p->alignment_offset = |
451 | queue_limit_alignment_offset(&disk->queue->limits, start); | 456 | queue_limit_alignment_offset(&disk->queue->limits, start); |
452 | p->discard_alignment = | ||
453 | queue_limit_discard_alignment(&disk->queue->limits, start); | ||
454 | p->nr_sects = len; | 457 | p->nr_sects = len; |
455 | p->partno = partno; | 458 | p->partno = partno; |
456 | p->policy = get_disk_ro(disk); | 459 | p->policy = get_disk_ro(disk); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 300d7582006e..b78956b3c2e7 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -100,7 +100,6 @@ struct hd_struct { | |||
100 | sector_t start_sect; | 100 | sector_t start_sect; |
101 | sector_t nr_sects; | 101 | sector_t nr_sects; |
102 | sector_t alignment_offset; | 102 | sector_t alignment_offset; |
103 | unsigned int discard_alignment; | ||
104 | struct device __dev; | 103 | struct device __dev; |
105 | struct kobject *holder_dir; | 104 | struct kobject *holder_dir; |
106 | int policy, partno; | 105 | int policy, partno; |