diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 13:24:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 13:24:40 -0400 |
commit | bdf7cf1c83872a0586ce4c4da6889103cc36dbd3 (patch) | |
tree | 9311bbcf8b9ffbe7207eba5cca557275f8151ae7 /fs/partitions | |
parent | 40efeb4d0bb1993c3c10baff9b7d86839f99171e (diff) | |
parent | ac04fee0b5c55bbac0858727a4154110b55d3f5a (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
loop: export module parameters
block: export blk_{get,put}_queue()
block: remove unused variable in bio_attempt_front_merge()
block: always allocate genhd->ev if check_events is implemented
brd: export module parameters
brd: fix comment on initial device creation
brd: handle on-demand devices correctly
brd: limit 'max_part' module param to DISK_MAX_PARTS
brd: get rid of unused members from struct brd_device
block: fix oops on !disk->queue and sysfs discard alignment display
Diffstat (limited to 'fs/partitions')
-rw-r--r-- | fs/partitions/check.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 8ed4d3433199..f82e762eeca2 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -256,10 +256,12 @@ ssize_t part_discard_alignment_show(struct device *dev, | |||
256 | { | 256 | { |
257 | struct hd_struct *p = dev_to_part(dev); | 257 | struct hd_struct *p = dev_to_part(dev); |
258 | struct gendisk *disk = dev_to_disk(dev); | 258 | struct gendisk *disk = dev_to_disk(dev); |
259 | unsigned int alignment = 0; | ||
259 | 260 | ||
260 | return sprintf(buf, "%u\n", | 261 | if (disk->queue) |
261 | queue_limit_discard_alignment(&disk->queue->limits, | 262 | alignment = queue_limit_discard_alignment(&disk->queue->limits, |
262 | p->start_sect)); | 263 | p->start_sect); |
264 | return sprintf(buf, "%u\n", alignment); | ||
263 | } | 265 | } |
264 | 266 | ||
265 | ssize_t part_stat_show(struct device *dev, | 267 | ssize_t part_stat_show(struct device *dev, |