diff options
Diffstat (limited to 'mm/memory-failure.c')
| -rw-r--r-- | mm/memory-failure.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 4253e14fa709..3338c443272c 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
| @@ -737,7 +737,7 @@ static void hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
| 737 | ret != SWAP_SUCCESS, pfn); | 737 | ret != SWAP_SUCCESS, pfn); |
| 738 | } | 738 | } |
| 739 | 739 | ||
| 740 | int __memory_failure(unsigned long pfn, int trapno, int ref) | 740 | int __memory_failure(unsigned long pfn, int trapno, int flags) |
| 741 | { | 741 | { |
| 742 | unsigned long lru_flag; | 742 | unsigned long lru_flag; |
| 743 | struct page_state *ps; | 743 | struct page_state *ps; |
| @@ -773,7 +773,8 @@ 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 (!ref && !get_page_unless_zero(compound_head(p))) { | 776 | if (!(flags & MF_COUNT_INCREASED) && |
| 777 | !get_page_unless_zero(compound_head(p))) { | ||
| 777 | action_result(pfn, "free or high order kernel", IGNORED); | 778 | action_result(pfn, "free or high order kernel", IGNORED); |
| 778 | return PageBuddy(compound_head(p)) ? 0 : -EBUSY; | 779 | return PageBuddy(compound_head(p)) ? 0 : -EBUSY; |
| 779 | } | 780 | } |
