VM_BUG_ON_FOLIO(!folio_contains(folio, xas.xa_index),
folio);
} else {
- nr = 1 << xa_get_order(&mapping->i_pages, xas.xa_index);
+ nr = 1 << xas_get_order(&xas);
base = xas.xa_index & ~(nr - 1);
/* Omit order>0 value which begins before the start */
if (base < *start)
static inline size_t seek_folio_size(struct xa_state *xas, struct folio *folio)
{
if (xa_is_value(folio))
- return PAGE_SIZE << xa_get_order(xas->xa, xas->xa_index);
+ return PAGE_SIZE << xas_get_order(xas);
return folio_size(folio);
}
if (xas_retry(&xas, folio))
continue;
- order = xa_get_order(xas.xa, xas.xa_index);
+ order = xas_get_order(&xas);
nr_pages = 1 << order;
folio_first_index = round_down(xas.xa_index, 1 << order);
folio_last_index = folio_first_index + nr_pages - 1;
if (xas_retry(&xas, page))
continue;
if (xa_is_value(page))
- swapped += 1 << xa_get_order(xas.xa, xas.xa_index);
+ swapped += 1 << xas_get_order(&xas);
if (xas.xa_index == max)
break;
if (need_resched()) {