Messages in this thread | | | Date | Tue, 22 Aug 2023 19:14:55 +0200 | Subject | Re: [PATCH mm-unstable v1 1/4] mm/swap: stop using page->private on tail pages for THP_SWAP | From | David Hildenbrand <> |
| |
>> >> +static inline swp_entry_t page_swap_entry(struct page *page) >> +{ >> + struct folio *folio = page_folio(page); >> + swp_entry_t entry = folio_swap_entry(folio); >> + >> + entry.val += page - &folio->page; > > Would it be better to use folio_page_idx() here?
Sounds reasonable!
-- Cheers,
David / dhildenb
| |