From: Barry Song <v-songbaohua@xxxxxxxx>
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.
Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
---