X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=mm%2Fmemory-failure.c;h=dbe3e50c9aa5ea9a6bb46a3430ce04fe04b24e53;hb=f263fbb8d60824993c1b64385056a3cfdbb21d45;hp=ecc183fd94f36f35e91b69c6a06930bb456a7e86;hpb=89fbf5384ddf666a595eb6562dc63fcbfeb8f6a5;p=karo-tx-linux.git diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ecc183fd94f3..dbe3e50c9aa5 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -684,7 +684,7 @@ static int me_pagecache_dirty(struct page *p, unsigned long pfn) * the first EIO, but we're not worse than other parts * of the kernel. */ - mapping_set_error(mapping, EIO); + mapping_set_error(mapping, -EIO); } return me_pagecache_clean(p, pfn); @@ -1492,11 +1492,16 @@ EXPORT_SYMBOL(unpoison_memory); static struct page *new_page(struct page *p, unsigned long private, int **x) { int nid = page_to_nid(p); - if (PageHuge(p)) - return alloc_huge_page_node(page_hstate(compound_head(p)), - nid); - else + if (PageHuge(p)) { + struct hstate *hstate = page_hstate(compound_head(p)); + + if (hstate_is_gigantic(hstate)) + return alloc_huge_page_node(hstate, NUMA_NO_NODE); + + return alloc_huge_page_node(hstate, nid); + } else { return __alloc_pages_node(nid, GFP_HIGHUSER_MOVABLE, 0); + } } /*