forked from luck/tmp_suning_uos_patched
mm, hwpoison: remove recalculating hpage
hpage is never used after try_to_split_thp_page() in memory_failure(), so we don't have to update hpage. So let's not recalculate/use hpage. Suggested-by: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> Signed-off-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Signed-off-by: Oscar Salvador <osalvador@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Aristeu Rozanski <aris@ruivo.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: David Hildenbrand <david@redhat.com> Cc: Dmitry Yakunin <zeil@yandex-team.ru> Cc: Michal Hocko <mhocko@kernel.org> Cc: Oscar Salvador <osalvador@suse.com> Cc: Qian Cai <cai@lca.pw> Cc: Tony Luck <tony.luck@intel.com> Link: https://lkml.kernel.org/r/20200922135650.1634-3-osalvador@suse.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7d9d46ac87
commit
1b473becde
|
@ -1341,7 +1341,6 @@ int memory_failure(unsigned long pfn, int flags)
|
||||||
}
|
}
|
||||||
unlock_page(p);
|
unlock_page(p);
|
||||||
VM_BUG_ON_PAGE(!page_count(p), p);
|
VM_BUG_ON_PAGE(!page_count(p), p);
|
||||||
hpage = compound_head(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1413,11 +1412,8 @@ int memory_failure(unsigned long pfn, int flags)
|
||||||
/*
|
/*
|
||||||
* Now take care of user space mappings.
|
* Now take care of user space mappings.
|
||||||
* Abort on fail: __delete_from_page_cache() assumes unmapped page.
|
* Abort on fail: __delete_from_page_cache() assumes unmapped page.
|
||||||
*
|
|
||||||
* When the raw error page is thp tail page, hpage points to the raw
|
|
||||||
* page after thp split.
|
|
||||||
*/
|
*/
|
||||||
if (!hwpoison_user_mappings(p, pfn, flags, &hpage)) {
|
if (!hwpoison_user_mappings(p, pfn, flags, &p)) {
|
||||||
action_result(pfn, MF_MSG_UNMAP_FAILED, MF_IGNORED);
|
action_result(pfn, MF_MSG_UNMAP_FAILED, MF_IGNORED);
|
||||||
res = -EBUSY;
|
res = -EBUSY;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user