lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RFC v3] mm: Proper document tail pages fields for folio
From
>>   	do {
>> xas_lock_irq(&xas);
>> @@ -113,7 +114,6 @@ int add_to_swap_cache(struct folio *folio, swp_entry_t entry,
>> if (shadowp)
>> *shadowp = old;
>> }
>> - set_page_private(folio_page(folio, i), entry.val + i);
>> xas_store(&xas, folio);
>> xas_next(&xas);
>> }
>> @@ -154,9 +154,9 @@ void __delete_from_swap_cache(struct folio *folio,
>> for (i = 0; i < nr; i++) {
>> void *entry = xas_store(&xas, shadow);
>> VM_BUG_ON_PAGE(entry != folio, entry);
>> - set_page_private(folio_page(folio, i), 0);
>> xas_next(&xas);
>> }
>> + folio->private = 0;
>
> I'd rather remove all direct reference to "private" for swap alongside, if
> this would be the last spot (perhaps folio_set_swap_entry()).

Good idea, thanks!

--
Cheers,

David / dhildenb

\
 
 \ /
  Last update: 2023-08-16 21:01    [W:0.054 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site