Since the pinned pages have been put into inevictable list, folio_maybe_dma_pinned() calls in shrink_page_list() could be removed. Signed-off-by: Jinjiang Tu <tujinjiang@xxxxxxxxxx> --- mm/vmscan.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 2fe4a11d63f4..590833c1fdbe 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1891,8 +1891,6 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, if (!folio_test_swapcache(folio)) { if (!(sc->gfp_mask & __GFP_IO)) goto keep_locked; - if (folio_maybe_dma_pinned(folio)) - goto keep_locked; if (folio_test_large(folio)) { /* cannot split folio, skip it */ if (!can_split_folio(folio, NULL)) @@ -1959,16 +1957,6 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, } } - /* - * Folio is unmapped now so it cannot be newly pinned anymore. - * No point in trying to reclaim folio if it is pinned. - * Furthermore we don't want to reclaim underlying fs metadata - * if the folio is pinned and thus potentially modified by the - * pinning process as that may upset the filesystem. - */ - if (folio_maybe_dma_pinned(folio)) - goto activate_locked; - mapping = folio_mapping(folio); if (folio_test_dirty(folio)) { /* -- 2.25.1