Skip to content
Snippets Groups Projects
user avatar
Yongkai Wu authored
A stack trace was triggered by VM_BUG_ON_PAGE(page_mapcount(page), page)
in free_huge_page().  Unfortunately, the page->mapping field was set to
NULL before this test.  This made it more difficult to determine the
root cause of the problem.

Move the VM_BUG_ON_PAGE tests earlier in the function so that if they do
trigger more information is present in the page struct.

Link: http://lkml.kernel.org/r/1543491843-23438-1-git-send-email-nic_w@163.com


Signed-off-by: default avatarYongkai Wu <nic_w@163.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Acked-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: default avatarWilliam Kucharski <william.kucharski@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
8ace22bc
History
Name Last commit Last update