lkml.org 
[lkml]   [2024]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/6] mm/migrate: introduce migrate_pfn_to_folio()
From
On 2/16/24 1:50 PM, Matthew Wilcox wrote:
> On Fri, Feb 16, 2024 at 01:13:15PM -0800, Sidhartha Kumar wrote:
>> +static inline struct folio *migrate_pfn_to_folio(unsigned long mpfn)
>> +{
>> + return page_folio(migrate_pfn_to_page(mpfn));
>
> umm, no.
>
> struct page *page = migrate_pfn_to_page(mpfn);
> if (page)
> return page_folio(page);
> return NULL;

Thanks, I overlooked checking for NULL before converting the page to a folio.
I'll make this change for v3.

\
 
 \ /
  Last update: 2024-05-27 15:07    [W:0.091 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site