diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-05-06 21:25:03 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-05-06 21:25:03 +0300 |
commit | 706ce3caea1cc1dab8c7fd6e7d1389b46ad1570e (patch) | |
tree | ba7d065f00d18c0f98c88d5d8aee2120b0020337 /mm/vmscan.c | |
parent | 994e2419f1e77724479f0ffd5ad4eeae060dec95 (diff) | |
parent | 58f5f6698a72a8af5d7bfc5f49b6df60f378f167 (diff) | |
download | linux-706ce3caea1cc1dab8c7fd6e7d1389b46ad1570e.tar.xz |
Merge tag 'mm-hotfixes-stable-2023-05-06-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull hotfixes from Andrew Morton:
"Five hotfixes.
Three are cc:stable, two pertain to merge window changes"
* tag 'mm-hotfixes-stable-2023-05-06-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
afs: fix the afs_dir_get_folio return value
nilfs2: do not write dirty data after degenerating to read-only
mm: do not reclaim private data from pinned page
nilfs2: fix infinite loop in nilfs_mdt_get_block()
mm/mmap/vma_merge: always check invariants
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 5bde07409303..d257916f39e5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1967,6 +1967,16 @@ retry: } } + /* + * 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)) { /* |