]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hugetlb: fix size=4G parsing
authorHugh Dickins <hugh@veritas.com>
Sun, 28 Oct 2007 21:32:04 +0000 (22:32 +0100)
committerAdrian Bunk <bunk@kernel.org>
Sun, 28 Oct 2007 21:32:04 +0000 (22:32 +0100)
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>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
fs/hugetlbfs/inode.c

index ed8f5875e6af9e46a418b90cd22e58b5a4c324f8..fe67514e3ec167aebd438b965a5d020529d7d1d3 100644 (file)
@@ -661,7 +661,6 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig)
                                do_div(size, 100);
                                rest++;
                        }
-                       size &= HPAGE_MASK;
                        pconfig->nr_blocks = (size >> HPAGE_SHIFT);
                        value = rest;
                } else if (!strcmp(opt,"nr_inodes")) {