On Fri, 20 Oct 2023 17:14:36 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > This was changed from find_lock_page() which returns NULL to > filemap_lock_folio() which returns error pointers. Update the > error checking to match. > > --- 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) { Also doesn't appear applicable to current kernels?