From: ZhangPeng zhangpeng362@huawei.com
Support large folio for mlock. Backport from v6.7-rc1.
ChangeLog:
v1->v2: - Add a bugfix patch of patch 2
Hugh Dickins (1): mm: mlock: avoid folio_within_range() on KSM pages
Yin Fengwei (3): mm: add functions folio_in_range() and folio_within_vma() mm: handle large folio when large folio in VM_LOCKED VMA range mm: mlock: update mlock_pte_range to handle large folio
mm/internal.h | 73 ++++++++++++++++++++++++++++++++++++++++++++------- mm/mlock.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++-- mm/rmap.c | 66 ++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 186 insertions(+), 23 deletions(-)