mm, hugetlb: return a reserved page to a reserved pool if failed
authorJoonsoo Kim <[email protected]>
Wed, 11 Sep 2013 21:21:58 +0000 (14:21 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Sep 2013 22:57:45 +0000 (15:57 -0700)
commit07443a85ad90c7b62fbe11dcd3d6a1de1e10516f
tree2193cff9bf1cb0f8d9f90dd2039e068f4cb67823
parent8312034f3604bc0339c40545c538116f4ddad152
mm, hugetlb: return a reserved page to a reserved pool if failed

If we fail with a reserved page, just calling put_page() is not
sufficient, because put_page() invoke free_huge_page() at last step and it
doesn't know whether a page comes from a reserved pool or not.  So it
doesn't do anything related to reserved count.  This makes reserve count
lower than how we need, because reserve count already decrease in
dequeue_huge_page_vma().  This patch fix this situation.

Signed-off-by: Joonsoo Kim <[email protected]>
Cc: Aneesh Kumar <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: David Gibson <[email protected]>
Cc: Wanpeng Li <[email protected]>
Cc: Hillf Danton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/hugetlb.c