Merge tag 'for-5.12/io_uring-2021-02-17' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / mm / vmscan.c
index 257cba7..b1b574a 100644 (file)
@@ -1238,6 +1238,8 @@ static unsigned int shrink_page_list(struct list_head *page_list,
                        if (!PageSwapCache(page)) {
                                if (!(sc->gfp_mask & __GFP_IO))
                                        goto keep_locked;
+                               if (page_maybe_dma_pinned(page))
+                                       goto keep_locked;
                                if (PageTransHuge(page)) {
                                        /* cannot split THP, skip it */
                                        if (!can_split_huge_page(page, NULL))