]> err.no Git - linux-2.6/commit
[PATCH] mm: hugepage accounting fix
authorHugh Dickins <hugh@veritas.com>
Wed, 1 Feb 2006 11:05:31 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:15 +0000 (08:53 -0800)
commit4e6a510a74145585f4111d60d1b5fd450d795dd8
treeff1cb5ba871d6c3f1b90276b865853e20cddefff
parent9884fd8df195fe48d4e1be2279b419be96127cae
[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 <hugh@veritas.com>
Acked-By: Adam Litke <agl@us.ibm.com>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/hugetlbfs/inode.c