OSDN Git Service

[DISKLABEL] SUN: Fix signed int usage for sector count
authorJeff Mahoney <jeffm@suse.com>
Sat, 26 Aug 2006 05:58:57 +0000 (22:58 -0700)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Aug 2006 04:21:52 +0000 (06:21 +0200)
commitcdcc944c2cc851397ca6a01f5312d717f832d373
tree1cc5425755e919d74707a86b43ae55eca532479f
parentaf30313f5d14531bff3df468e2c59cff15b2d5a0
[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>
fs/partitions/sun.c