Re: [PATCH] mm: fix false-positive WARN_ON() in truncate/invalidate for hugetlb

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

 



On Wed, Nov 23, 2016 at 12:30:53PM +0300, Kirill A. Shutemov wrote:
> Sorry, forgot to commit local changes.
> 
> ----8<----
> 
> From 321379738fa2359385a38dfac838a83c261a382d Mon Sep 17 00:00:00 2001
> From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
> Date: Wed, 23 Nov 2016 12:05:30 +0300
> Subject: [PATCH] mm: fix false-positive WARN_ON() in truncate/invalidate for
>  hugetlb
> 
> Hugetlb pages have ->index in size of the huge pages (PMD_SIZE or
> PUD_SIZE), not in PAGE_SIZE as other types of pages. This means we
> cannot user page_to_pgoff() to check whether we've got the right page
> for the radix-tree index.
> 
> Let's introduce page_to_index() which would return radix-tree index for
> given page.
> 
> We will be able to get rid of this once hugetlb will be switched to
> multi-order entries.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Reported-and-tested-by: Doug Nelson <doug.nelson@xxxxxxxxx>
> Fixes: fc127da085c2 ("truncate: handle file thp")
> Cc: <stable@xxxxxxxxxxxxxxx> [4.8+]

Reviewed-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
--
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



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