2.4.36-stable kernel tree
リビジョン | cdcc944c2cc851397ca6a01f5312d717f832d373 (tree) |
---|---|
日時 | 2006-08-28 13:21:52 |
作者 | Jeff Mahoney <jeffm@suse...> |
コミッター | Willy Tarreau |
[DISKLABEL] SUN: Fix signed int usage for sector count
The current sun disklabel code uses a signed int for the sector count.
When partitions larger than 1 TB are used, the cast to a sector_t causes
the partition sizes to be invalid:
This patch switches the sector count to an unsigned int to fix this.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
@@ -86,7 +86,7 @@ int sun_partition(struct gendisk *hd, struct block_device *bdev, unsigned long f | ||
86 | 86 | spc = be16_to_cpu(label->ntrks) * be16_to_cpu(label->nsect); |
87 | 87 | for (i = 0; i < 8; i++, p++) { |
88 | 88 | unsigned long st_sector; |
89 | - int num_sectors; | |
89 | + unsigned int num_sectors; | |
90 | 90 | |
91 | 91 | st_sector = first_sector + be32_to_cpu(p->start_cylinder) * spc; |
92 | 92 | num_sectors = be32_to_cpu(p->num_sectors); |