diff options
| author | David Hildenbrand <[email protected]> | 2023-09-13 14:51:12 +0200 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-10-04 10:32:27 -0700 |
| commit | 132b180f06a74ddfc526709928036db3b7a1cf6d (patch) | |
| tree | 334eadd59db3cfef2d05b32f05438bd8378aebf0 /include/linux/workqueue_api.h | |
| parent | a1f34ee1de2c3a55bc2a6b9a38e1ecd2830dcc03 (diff) | |
mm/rmap: simplify PageAnonExclusive sanity checks when adding anon rmap
Let's sanity-check PageAnonExclusive vs. mapcount in page_add_anon_rmap()
and hugepage_add_anon_rmap() after setting PageAnonExclusive simply by
re-reading the mapcounts.
We can stop initializing the "first" variable in page_add_anon_rmap() and
no longer need an atomic_inc_and_test() in hugepage_add_anon_rmap().
While at it, switch to VM_WARN_ON_FOLIO().
[[email protected]: update check for doubly-mapped page]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Muchun Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions