]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] hugetlbfs mmap ENOMEM failure
authorHugh Dickins <hugh@veritas.com>
Sun, 12 Feb 2006 19:26:05 +0000 (19:26 +0000)
committerChris Wright <chrisw@sous-sol.org>
Wed, 1 Mar 2006 22:36:32 +0000 (14:36 -0800)
commit32065dc4c027c69cc03431155db36ea27f9f98f5
tree28c26cb67e150fa03f9c97e9b9865f9727d7a5c9
parentbcf2887b1416a506e3461c504642a1b7fad52ddc
[PATCH] hugetlbfs mmap ENOMEM failure

2.6.15's hugepage faulting introduced huge_pages_needed accounting into
hugetlbfs: to count how many pages are already in cache, for spot check
on how far a new mapping may be allowed to extend the file.  But it's
muddled: each hugepage found covers HPAGE_SIZE, not PAGE_SIZE.  Once
pages were already in cache, it would overshoot, wrap its hugepages
count backwards, and so fail a harmless repeat mapping with -ENOMEM.
Fixes the problem found by Don Dupuis.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-By: Adam Litke <agl@us.ibm.com>
Acked-by: William Irwin <wli@us.ibm.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/hugetlbfs/inode.c