This was changed from find_lock_page() which returns NULL to filemap_lock_folio() which returns error pointers. Update the error checking to match. Fixes: 8f5654d233e3 ("mm/khugepaged: convert collapse_pte_mapped_thp() to use folios") Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> --- mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index a25f5b7c3e7e..d977eb50704a 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1508,7 +1508,7 @@ int collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr, folio = filemap_lock_folio(vma->vm_file->f_mapping, linear_page_index(vma, haddr)); - if (!folio) + if (IS_ERR(folio)) return SCAN_PAGE_NULL; if (folio_order(folio) != HPAGE_PMD_ORDER) { -- 2.42.0