diff options
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 275f4e2df8ac..4253e14fa709 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -627,7 +627,7 @@ static void action_result(unsigned long pfn, char *msg, int result) | |||
627 | } | 627 | } |
628 | 628 | ||
629 | static int page_action(struct page_state *ps, struct page *p, | 629 | static int page_action(struct page_state *ps, struct page *p, |
630 | unsigned long pfn, int ref) | 630 | unsigned long pfn) |
631 | { | 631 | { |
632 | int result; | 632 | int result; |
633 | int count; | 633 | int count; |
@@ -635,7 +635,7 @@ static int page_action(struct page_state *ps, struct page *p, | |||
635 | result = ps->action(p, pfn); | 635 | result = ps->action(p, pfn); |
636 | action_result(pfn, ps->msg, result); | 636 | action_result(pfn, ps->msg, result); |
637 | 637 | ||
638 | count = page_count(p) - 1 - ref; | 638 | count = page_count(p) - 1; |
639 | if (count != 0) | 639 | if (count != 0) |
640 | printk(KERN_ERR | 640 | printk(KERN_ERR |
641 | "MCE %#lx: %s page still referenced by %d users\n", | 641 | "MCE %#lx: %s page still referenced by %d users\n", |
@@ -773,7 +773,7 @@ int __memory_failure(unsigned long pfn, int trapno, int ref) | |||
773 | * In fact it's dangerous to directly bump up page count from 0, | 773 | * In fact it's dangerous to directly bump up page count from 0, |
774 | * that may make page_freeze_refs()/page_unfreeze_refs() mismatch. | 774 | * that may make page_freeze_refs()/page_unfreeze_refs() mismatch. |
775 | */ | 775 | */ |
776 | if (!get_page_unless_zero(compound_head(p))) { | 776 | if (!ref && !get_page_unless_zero(compound_head(p))) { |
777 | action_result(pfn, "free or high order kernel", IGNORED); | 777 | action_result(pfn, "free or high order kernel", IGNORED); |
778 | return PageBuddy(compound_head(p)) ? 0 : -EBUSY; | 778 | return PageBuddy(compound_head(p)) ? 0 : -EBUSY; |
779 | } | 779 | } |
@@ -821,7 +821,7 @@ int __memory_failure(unsigned long pfn, int trapno, int ref) | |||
821 | res = -EBUSY; | 821 | res = -EBUSY; |
822 | for (ps = error_states;; ps++) { | 822 | for (ps = error_states;; ps++) { |
823 | if (((p->flags | lru_flag)& ps->mask) == ps->res) { | 823 | if (((p->flags | lru_flag)& ps->mask) == ps->res) { |
824 | res = page_action(ps, p, pfn, ref); | 824 | res = page_action(ps, p, pfn); |
825 | break; | 825 | break; |
826 | } | 826 | } |
827 | } | 827 | } |