[PATCH 1/3] hugetlb: fix size=4G parsing

Hugh Dickins
2006-10-25T02:31:06Z

On 32-bit machines, mount -t hugetlbfs -o size=4G gave a 0GB filesystem,
size=5G gave a 1GB filesystem etc: there's no point in masking size with
HPAGE_MASK just before shifting its lower bits away, and since HPAGE_MASK
is a UL, that removed all the higher bits of the unsigned long long size.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
___

fs/hugetlbfs/inode.c | 1 -
1 file changed, 1 deletion(-)

--- 2.6.19-rc3/fs/hugetlbfs/inode.c 2006-10-24 04:34:28.000000000 +0100
+++ linux/fs/hugetlbfs/inode.c 2006-10-24 17:43:08.000000000 +0100
@@ -624,7 +624,6 @@ hugetlbfs_parse_options(char *options, s
do_div(size, 100);
rest++;
}
- size &= HPAGE_MASK;
pconfig->nr_blocks = (size >> HPAGE_SHIFT);
value = rest;
} else if (!strcmp(opt,"nr_inodes")) {