On Tue, May 21, 2024 at 5:38 AM Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote: > > Folios of order <= 1 are not in deferred list, the check of order > is added into folio_undo_large_rmappable() from commit 8897277acfef > ("mm: support order-1 folios in the page cache"), but there is a > repeated check for small folio (order 0) during each call of the > folio_undo_large_rmappable(), so only keep folio_order() check > inside the function. > > In addition, move all the checks into header file to save a function > call for non-large-rmappable or empty deferred_list folio. > > Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx>