diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 92e6f56a932d..3b47e359f2e0 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1840,6 +1840,10 @@ static int collapse_file(struct mm_struct *mm, unsigned long addr, goto xa_locked; } xas_store(&xas, hpage); + if (xas_error(&xas)) { + result = SCAN_FAIL; + goto xa_locked; + } nr_none++; continue; }