The patch titled Subject: mm/filemap.c: add comment for confusing logic in page_cache_tree_insert() has been added to the -mm tree. Its filename is filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Subject: mm/filemap.c: add comment for confusing logic in page_cache_tree_insert() Unlike THP, hugetlb pages are represented by one entry in the radix-tree. Link: http://lkml.kernel.org/r/20161110163640.126124-1-kirill.shutemov@xxxxxxxxxxxxxxx Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/filemap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff -puN mm/filemap.c~filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert mm/filemap.c --- a/mm/filemap.c~filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert +++ a/mm/filemap.c @@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct static void page_cache_tree_delete(struct address_space *mapping, struct page *page, void *shadow) { - int i, nr = PageHuge(page) ? 1 : hpage_nr_pages(page); + int i, nr; + + /* hugetlb pages represented by one entry on radix-tree */ + nr = PageHuge(page) ? 1 : hpage_nr_pages(page); VM_BUG_ON_PAGE(!PageLocked(page), page); VM_BUG_ON_PAGE(PageTail(page), page); _ Patches currently in -mm which might be from kirill.shutemov@xxxxxxxxxxxxxxx are mm-bug-in-munlock_vma_pages_range.patch filemap-add-comment-for-confusing-logic-in-page_cache_tree_insert.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html