Skip to content

Commit a2cee27

Browse files
committed
ON-17172: Convert page to folio to access index
The offset has changed name in the page struct, but is consistently called index in the folio struct, so by using the folio we retain compat between versions.
1 parent d59ec6c commit a2cee27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/kernel_utils/hugetlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ loff_t
318318
oo_hugetlb_page_offset(struct page *page)
319319
{
320320
#ifdef EFRM_HUGETLB_INDEX_BY_PAGE
321-
return page->index * PAGE_SIZE;
321+
return page_folio(page)->index * PAGE_SIZE;
322322
#else
323323
return page->index * OO_HUGEPAGE_SIZE;
324324
#endif

0 commit comments

Comments
 (0)