Commit 95d01fc664b9476e0d18e3d745bb209a42a33588
Committed by
Andi Kleen
1 parent
dc2a1cbf7d
Exists in
master
and in
4 other branches
HWPOISON: remove the free buddy page handler
The buddy page has already be handled in the very beginning. So remove redundant code. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Showing 1 changed file with 4 additions and 10 deletions Side-by-side Diff
mm/memory-failure.c
... | ... | @@ -401,14 +401,6 @@ |
401 | 401 | } |
402 | 402 | |
403 | 403 | /* |
404 | - * Free memory | |
405 | - */ | |
406 | -static int me_free(struct page *p, unsigned long pfn) | |
407 | -{ | |
408 | - return DELAYED; | |
409 | -} | |
410 | - | |
411 | -/* | |
412 | 404 | * Clean (or cleaned) page cache page. |
413 | 405 | */ |
414 | 406 | static int me_pagecache_clean(struct page *p, unsigned long pfn) |
... | ... | @@ -604,7 +596,6 @@ |
604 | 596 | #define tail (1UL << PG_tail) |
605 | 597 | #define compound (1UL << PG_compound) |
606 | 598 | #define slab (1UL << PG_slab) |
607 | -#define buddy (1UL << PG_buddy) | |
608 | 599 | #define reserved (1UL << PG_reserved) |
609 | 600 | |
610 | 601 | static struct page_state { |
... | ... | @@ -614,7 +605,10 @@ |
614 | 605 | int (*action)(struct page *p, unsigned long pfn); |
615 | 606 | } error_states[] = { |
616 | 607 | { reserved, reserved, "reserved kernel", me_ignore }, |
617 | - { buddy, buddy, "free kernel", me_free }, | |
608 | + /* | |
609 | + * free pages are specially detected outside this table: | |
610 | + * PG_buddy pages only make a small fraction of all free pages. | |
611 | + */ | |
618 | 612 | |
619 | 613 | /* |
620 | 614 | * Could in theory check if slab page is free or if we can drop |