• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: コミット

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:

# cat /proc/paritions | grep sdan
66 112 2146435072 sdan
66 115 9223372036853660736 sdan3
66 120 9223372036853660736 sdan8

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>

変更サマリ

差分

--- a/fs/partitions/sun.c
+++ b/fs/partitions/sun.c
@@ -86,7 +86,7 @@ int sun_partition(struct gendisk *hd, struct block_device *bdev, unsigned long f
8686 spc = be16_to_cpu(label->ntrks) * be16_to_cpu(label->nsect);
8787 for (i = 0; i < 8; i++, p++) {
8888 unsigned long st_sector;
89- int num_sectors;
89+ unsigned int num_sectors;
9090
9191 st_sector = first_sector + be32_to_cpu(p->start_cylinder) * spc;
9292 num_sectors = be32_to_cpu(p->num_sectors);
旧リポジトリブラウザで表示