projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cifs: replace code with free_rsp_buf()
[firefly-linux-kernel-4.4.55.git]
/
mm
/
memory-failure.c
diff --git
a/mm/memory-failure.c
b/mm/memory-failure.c
index 7211a73ba14d16155c1514c078b1e3c9d25e0b22..a013bc94ebbed4af3764e396b087475310ed5185 100644
(file)
--- 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;
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;
/*
return SWAP_SUCCESS;
/*
@@
-905,8
+911,10
@@
static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
if (!page_mapped(hpage))
return SWAP_SUCCESS;
if (!page_mapped(hpage))
return SWAP_SUCCESS;
- if (PageKsm(p))
+ if (PageKsm(p)) {
+ pr_err("MCE %#lx: can't handle KSM pages.\n", pfn);
return SWAP_FAIL;
return SWAP_FAIL;
+ }
if (PageSwapCache(p)) {
printk(KERN_ERR
if (PageSwapCache(p)) {
printk(KERN_ERR
@@
-1229,7
+1237,7
@@
int memory_failure(unsigned long pfn, int trapno, int flags)
*/
if (hwpoison_user_mappings(p, pfn, trapno, flags, &hpage)
!= SWAP_SUCCESS) {
*/
if (hwpoison_user_mappings(p, pfn, trapno, flags, &hpage)
!= SWAP_SUCCESS) {
-
printk(KERN_ERR "MCE %#lx: cannot unmap page, give up\n", pfn
);
+
action_result(pfn, "unmapping failed", IGNORED
);
res = -EBUSY;
goto out;
}
res = -EBUSY;
goto out;
}