FROMGIT: BACKPORT: mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty write-protect
Patch series "mm: introduce pmd|pte_needs_soft_dirty_wp helpers and utilize them", v2. This patchset introduces the pte_need_soft_dirty_wp and pmd_need_soft_dirty_wp helpers to determine if write protection is required for softdirty tracking. These helpers enhance code readability and improve the overall appearance. They are then utilized in gup, mprotect, swap, and other related functions. This patch (of 2): This patch introduces the pte_needs_soft_dirty_wp and pmd_needs_soft_dirty_wp helpers to determine if write protection is required for softdirty tracking. This can enhance code readability and improve its overall appearance. These new helpers are then utilized in gup, huge_memory, and mprotect. Link: https://lkml.kernel.org/r/20240607211358.4660-1-21cnbao@gmail.com Link: https://lkml.kernel.org/r/20240607211358.4660-2-21cnbao@gmail.com Change-Id: Ie7f7df016fbb44a97c99052b88438a3ad36b78a2 Signed-off-by:Barry Song <v-songbaohua@oppo.com> Suggested-by:
David Hildenbrand <david@redhat.com> Acked-by:
David Hildenbrand <david@redhat.com> Cc: Chris Li <chrisl@kernel.org> Cc: Kairui Song <kasong@tencent.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Suren Baghdasaryan <surenb@google.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Bug: 313807618 [ Fix conflict in can_follow_write_pmd() which lives in mm/huge_memory.c in 6.6 but was later moved to mm/gup.c - Kalesh Singh ] (cherry picked from commit 758a4f2de19e30e6e74e65175a1f38756edaf8af https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable) Signed-off-by:
Kalesh Singh <kaleshsingh@google.com>
Loading
Please sign in to comment