From: Hugh Dickins Date: Wed, 1 Feb 2006 11:05:31 +0000 (-0800) Subject: [PATCH] mm: hugepage accounting fix X-Git-Tag: v2.6.16-rc2~109 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e6a510a74145585f4111d60d1b5fd450d795dd8;p=pandora-kernel.git [PATCH] mm: hugepage accounting fix 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 Acked-By: Adam Litke Acked-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed