[PATCH] zsmalloc: zspage sanity check
From: Minchan Kim
Date: Thu Jun 02 2016 - 20:54:03 EST
The zsmalloc page migration is new feature so I want to catch any
corruption of zspage struct which is very critical to work
regardless of CONFIG_DEBUG_VM.
Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
---
mm/zsmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index a80100db16d6..f75d2d134741 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -523,7 +523,7 @@ static void get_zspage_mapping(struct zspage *zspage,
unsigned int *class_idx,
enum fullness_group *fullness)
{
- VM_BUG_ON(zspage->magic != ZSPAGE_MAGIC);
+ BUG_ON(zspage->magic != ZSPAGE_MAGIC);
*fullness = zspage->fullness;
*class_idx = zspage->class;
@@ -857,7 +857,7 @@ static struct zspage *get_zspage(struct page *page)
{
struct zspage *zspage = (struct zspage *)page->private;
- VM_BUG_ON(zspage->magic != ZSPAGE_MAGIC);
+ BUG_ON(zspage->magic != ZSPAGE_MAGIC);
return zspage;
}
--
1.9.1