From: Naoya Horiguchi Date: Wed, 8 Sep 2010 01:19:37 +0000 (+0900) Subject: hugetlb: move refcounting in hugepage allocation inside hugetlb_lock X-Git-Tag: v2.6.37-rc1~109^2^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9869b837c098732bad84939015c0eb391b23e41;p=pandora-kernel.git hugetlb: move refcounting in hugepage allocation inside hugetlb_lock Currently alloc_huge_page() raises page refcount outside hugetlb_lock. but it causes race when dequeue_hwpoison_huge_page() runs concurrently with alloc_huge_page(). To avoid it, this patch moves set_page_refcounted() in hugetlb_lock. Signed-off-by: Naoya Horiguchi Signed-off-by: Wu Fengguang Acked-by: Mel Gorman Reviewed-by: Christoph Lameter Signed-off-by: Andi Kleen --- Reading git-diff-tree failed