The patch titled Subject: mm: add VM_BUG_ON_PAGE() to page_mapcount() has been added to the -mm tree. Its filename is mm-add-vm_bug_on_page-for-page_mapcount.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-add-vm_bug_on_page-for-page_mapcount.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-add-vm_bug_on_page-for-page_mapcount.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: "Wang, Yalin" <Yalin.Wang@xxxxxxxxxxxxxx> Subject: mm: add VM_BUG_ON_PAGE() to page_mapcount() Add VM_BUG_ON_PAGE() for slab pages. _mapcount is an union with slab struct in struct page, so we must avoid accessing _mapcount if this page is a slab page. Also remove the unneeded bracket. Signed-off-by: Yalin Wang <yalin.wang@xxxxxxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/mm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN include/linux/mm.h~mm-add-vm_bug_on_page-for-page_mapcount include/linux/mm.h --- a/include/linux/mm.h~mm-add-vm_bug_on_page-for-page_mapcount +++ a/include/linux/mm.h @@ -467,7 +467,8 @@ static inline void page_mapcount_reset(s static inline int page_mapcount(struct page *page) { - return atomic_read(&(page)->_mapcount) + 1; + VM_BUG_ON_PAGE(PageSlab(page), page); + return atomic_read(&page->_mapcount) + 1; } static inline int page_count(struct page *page) _ Patches currently in -mm which might be from Yalin.Wang@xxxxxxxxxxxxxx are origin.patch mm-add-vm_bug_on_page-for-page_mapcount.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