aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_ext.c')
-rw-r--r--mm/page_ext.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/mm/page_ext.c b/mm/page_ext.c
index 121dcffc4ec1..88ccc044b09a 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -59,9 +59,6 @@
59 59
60static struct page_ext_operations *page_ext_ops[] = { 60static struct page_ext_operations *page_ext_ops[] = {
61 &debug_guardpage_ops, 61 &debug_guardpage_ops,
62#ifdef CONFIG_PAGE_POISONING
63 &page_poisoning_ops,
64#endif
65#ifdef CONFIG_PAGE_OWNER 62#ifdef CONFIG_PAGE_OWNER
66 &page_owner_ops, 63 &page_owner_ops,
67#endif 64#endif
@@ -127,15 +124,12 @@ struct page_ext *lookup_page_ext(struct page *page)
127 struct page_ext *base; 124 struct page_ext *base;
128 125
129 base = NODE_DATA(page_to_nid(page))->node_page_ext; 126 base = NODE_DATA(page_to_nid(page))->node_page_ext;
130#if defined(CONFIG_DEBUG_VM) || defined(CONFIG_PAGE_POISONING) 127#if defined(CONFIG_DEBUG_VM)
131 /* 128 /*
132 * The sanity checks the page allocator does upon freeing a 129 * The sanity checks the page allocator does upon freeing a
133 * page can reach here before the page_ext arrays are 130 * page can reach here before the page_ext arrays are
134 * allocated when feeding a range of pages to the allocator 131 * allocated when feeding a range of pages to the allocator
135 * for the first time during bootup or memory hotplug. 132 * for the first time during bootup or memory hotplug.
136 *
137 * This check is also necessary for ensuring page poisoning
138 * works as expected when enabled
139 */ 133 */
140 if (unlikely(!base)) 134 if (unlikely(!base))
141 return NULL; 135 return NULL;
@@ -204,15 +198,12 @@ struct page_ext *lookup_page_ext(struct page *page)
204{ 198{
205 unsigned long pfn = page_to_pfn(page); 199 unsigned long pfn = page_to_pfn(page);
206 struct mem_section *section = __pfn_to_section(pfn); 200 struct mem_section *section = __pfn_to_section(pfn);
207#if defined(CONFIG_DEBUG_VM) || defined(CONFIG_PAGE_POISONING) 201#if defined(CONFIG_DEBUG_VM)
208 /* 202 /*
209 * The sanity checks the page allocator does upon freeing a 203 * The sanity checks the page allocator does upon freeing a
210 * page can reach here before the page_ext arrays are 204 * page can reach here before the page_ext arrays are
211 * allocated when feeding a range of pages to the allocator 205 * allocated when feeding a range of pages to the allocator
212 * for the first time during bootup or memory hotplug. 206 * for the first time during bootup or memory hotplug.
213 *
214 * This check is also necessary for ensuring page poisoning
215 * works as expected when enabled
216 */ 207 */
217 if (!section->page_ext) 208 if (!section->page_ext)
218 return NULL; 209 return NULL;