]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-dump-page-when-hitting-a-vm_bug_on-using-vm_bug_on_page-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Jan 2014 03:10:04 +0000 (14:10 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:10:04 +0000 (14:10 +1100)
Fix the patch for mm-print-more-details-for-bad_page.patch.

Also fix up an include mess - various files were using mmdebug.h
facilities but were not including that file.

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/gfp.h
include/linux/hugetlb.h
include/linux/hugetlb_cgroup.h
include/linux/mm.h
include/linux/mmdebug.h
include/linux/percpu.h

index 9b4dd491f7e8db512d11d357a83900497750197e..0437439bc047bd4a99d7465132b1d9417667934e 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __LINUX_GFP_H
 #define __LINUX_GFP_H
 
+#include <linux/mmdebug.h>
 #include <linux/mmzone.h>
 #include <linux/stddef.h>
 #include <linux/linkage.h>
index eff5e24762c8ca61ab7f37d94b2ac89027ffd214..8c43cc469d78259b6028dfb30be8899b9a95e3d0 100644 (file)
@@ -2,6 +2,7 @@
 #define _LINUX_HUGETLB_H
 
 #include <linux/mm_types.h>
+#include <linux/mmdebug.h>
 #include <linux/fs.h>
 #include <linux/hugetlb_inline.h>
 #include <linux/cgroup.h>
index 844bd5a10bf055e753d52e0c739172c9c5a6277c..787bba3bf5528e6679cea598c2c212c5fb108ea2 100644 (file)
@@ -15,6 +15,7 @@
 #ifndef _LINUX_HUGETLB_CGROUP_H
 #define _LINUX_HUGETLB_CGROUP_H
 
+#include <linux/mmdebug.h>
 #include <linux/res_counter.h>
 
 struct hugetlb_cgroup;
index 1d2088c5b8f24ecca080e750d3af5e4a8ba9f7d4..22f05a05dda2556b0e4353d9afc825df0df5c52b 100644 (file)
@@ -5,6 +5,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/mmdebug.h>
 #include <linux/gfp.h>
 #include <linux/bug.h>
 #include <linux/list.h>
@@ -2026,10 +2027,6 @@ extern void shake_page(struct page *p, int access);
 extern atomic_long_t num_poisoned_pages;
 extern int soft_offline_page(struct page *page, int flags);
 
-extern void dump_page(struct page *page, char *reason);
-extern void dump_page_badflags(struct page *page, char *reason,
-                              unsigned long badflags);
-
 #if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS)
 extern void clear_huge_page(struct page *page,
                            unsigned long addr,
index 8bb64900da25f437bec6cc5715ebbc3008229aa1..5042c036dda9fcddcef627743d588f62b5aa4aaf 100644 (file)
@@ -1,11 +1,16 @@
 #ifndef LINUX_MM_DEBUG_H
 #define LINUX_MM_DEBUG_H 1
 
+struct page;
+
+extern void dump_page(struct page *page, char *reason);
+extern void dump_page_badflags(struct page *page, char *reason,
+                              unsigned long badflags);
+
 #ifdef CONFIG_DEBUG_VM
-extern void dump_page(struct page *page);
 #define VM_BUG_ON(cond) BUG_ON(cond)
 #define VM_BUG_ON_PAGE(cond, page) \
-       do { if (unlikely(cond)) { dump_page(page); BUG(); } } while(0)
+       do { if (unlikely(cond)) { dump_page(page, NULL); BUG(); } } while (0)
 #else
 #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
 #define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
index 9e4761caa80c6ec906d2c0edad62cfbd2d4ab3bd..e3817d2441b697c2042a9e4b7624d99333671cb3 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __LINUX_PERCPU_H
 #define __LINUX_PERCPU_H
 
+#include <linux/mmdebug.h>
 #include <linux/preempt.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>