diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 7211a73ba14d..3db261fdee4c 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -895,7 +895,13 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, struct page *hpage = *hpagep; struct page *ppage; - if (PageReserved(p) || PageSlab(p) || !PageLRU(p)) + /* + * Here we are interested only in user-mapped pages, so skip any + * other types of pages. + */ + if (PageReserved(p) || PageSlab(p)) + return SWAP_SUCCESS; + if (!(PageLRU(hpage) || PageHuge(p))) return SWAP_SUCCESS; /* |