Skip to content
Commit 1d148e21 authored by Wang, Yalin's avatar Wang, Yalin Committed by Linus Torvalds
Browse files

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: default avatarYalin Wang <yalin.wang@sonymobile.com>
Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e4b294c2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment