Re: [PATCH v2] rmap: Fix compound check logic in page_remove_file_rmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 10, 2016 at 03:10:17PM +0100, Steve Capper wrote:
> In page_remove_file_rmap(.) we have the following check:
>   VM_BUG_ON_PAGE(compound && !PageTransHuge(page), page);
> 
> This is meant to check for either HugeTLB pages or THP when a compound
> page is passed in.
> 
> Unfortunately, if one disables CONFIG_TRANSPARENT_HUGEPAGE, then
> PageTransHuge(.) will always return false, provoking BUGs when one runs
> the libhugetlbfs test suite.
> 
> This patch replaces PageTransHuge(), with PageHead() which will work for
> both HugeTLB and THP.
> 
> Fixes: dd78fedde4b9 ("rmap: support file thp")
> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Steve Capper <steve.capper@xxxxxxx>

Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]