diff options
| author | Dave Airlie <airlied@redhat.com> | 2026-01-28 12:44:28 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2026-01-28 12:44:28 +1000 |
| commit | 6704d98a4f48b7424edc0f7ae2a06c0a8af02e2f (patch) | |
| tree | 261ac2fddcd79f6b66568a613ee458260f5cc62c /include/linux/mm.h | |
| parent | 504f3cead6b04914c53831f9efce902b8d91c009 (diff) | |
| parent | 63804fed149a6750ffd28610c5c1c98cce6bd377 (diff) | |
BackMerge tag 'v6.19-rc7' into drm-next
Linux 6.19-rc7
This is needed for msm and rust trees.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 15076261d0c2..f0d5be9dc736 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -608,7 +608,11 @@ enum { /* * Flags which should result in page tables being copied on fork. These are * flags which indicate that the VMA maps page tables which cannot be - * reconsistuted upon page fault, so necessitate page table copying upon + * reconsistuted upon page fault, so necessitate page table copying upon fork. + * + * Note that these flags should be compared with the DESTINATION VMA not the + * source, as VM_UFFD_WP may not be propagated to destination, while all other + * flags will be. * * VM_PFNMAP / VM_MIXEDMAP - These contain kernel-mapped data which cannot be * reasonably reconstructed on page fault. @@ -2459,10 +2463,10 @@ static inline int folio_expected_ref_count(const struct folio *folio) if (WARN_ON_ONCE(page_has_type(&folio->page) && !folio_test_hugetlb(folio))) return 0; - if (folio_test_anon(folio)) { - /* One reference per page from the swapcache. */ - ref_count += folio_test_swapcache(folio) << order; - } else { + /* One reference per page from the swapcache. */ + ref_count += folio_test_swapcache(folio) << order; + + if (!folio_test_anon(folio)) { /* One reference per page from the pagecache. */ ref_count += !!folio->mapping << order; /* One reference from PG_private. */ |
