[PATCH] fix extra page ref count in follow_hugetlb_page
authorChen, Kenneth W <kenneth.w.chen@intel.com>
Fri, 31 Mar 2006 10:29:57 +0000 (02:29 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 31 Mar 2006 20:18:49 +0000 (12:18 -0800)
commitd6692183ac1d8f4a4e4015f9ce9acc2514618e0b
tree15d930c84cc93df5bc53ed29290abd46c3135272
parent93fac7041f082297b93655a0e49f659cd7520e40
[PATCH] fix extra page ref count in follow_hugetlb_page

git-commit: d5d4b0aa4e1430d73050babba999365593bdb9d2
"[PATCH] optimize follow_hugetlb_page" breaks mlock on hugepage areas.

I mis-interpret pages argument and made get_page() unconditional.  It
should only get a ref count when "pages" argument is non-null.

Credit goes to Adam Litke who spotted the bug.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/hugetlb.c