pte_dirty
#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
!pte_write(*pte) || !pte_dirty(*pte))) {
if (pte_dirty(tmp_pte))
VM_WARN_ONCE(pte_write(old_pte) && !pte_dirty(pte),
#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
if (pte_dirty(pte)) {
if (pte_dirty(pte)) {
if (pte_dirty(pte)) {
if (pte_dirty(pte)) {
if (pte_dirty(ptent))
if (pte_dirty(pte))
if (pte_dirty(tmp_pte))
if (pte_dirty(pte) != pte_dirty(orig_pte))
if (pte_dirty(orig_pte))
if (!pte_dirty(*pte) && mmuar <= PAGE_OFFSET)
if (!pte_present(*pte) || !pte_dirty(*pte)
if (!pte_dirty(*pte) && !KMAPAREA(mmuar))
if (write_fault && !pte_dirty(*ptep)) {
#define pmd_dirty(pmd) pte_dirty(pmd_pte(pmd))
#define pud_dirty(pud) pte_dirty(pud_pte(pud))
if (pte_present(pte) && pte_dirty(pte)) {
if (!pte_present(*ptep) || !pte_dirty(*ptep)) {
if (!pte_dirty(pte))
pte_dirty(entry) ? "Dirty " : "",
return pte_dirty(pud_pte(pud));
return pte_dirty(pmd_pte(pmd));
if (pte_dirty(tmp_pte))
if (pte_dirty(pte))
if (pte_dirty(orig_pte))
return pte_dirty(pte) ? __pte_mkhwwrite(pte) : pte;
return pte_dirty(pte);
pte_dirty(orig)) {
} else if (!pte_dirty(*pte))
WARN_ON(!pte_young(*pte) || (is_write && !pte_dirty(*pte)));
(write && (!pte_write(pte) || !pte_dirty(pte)))))
dirty = pte_dirty(ptent);
static void gather_stats(struct page *page, struct numa_maps *md, int pte_dirty,
if (pte_dirty || folio_test_dirty(folio))
gather_stats(page, md, pte_dirty(ptent), 1);
gather_stats(page, md, pte_dirty(huge_pte), 1);
return pte_dirty(pte);
#define is_ksm_zero_pte(pte) (is_zero_pfn(pte_pfn(pte)) && pte_dirty(pte))
if (pte_dirty(tmp_pte))
if (pte_dirty(tmp_pte))
WARN_ON(pte_dirty(pte_mkclean(pte_mkdirty(pte))));
WARN_ON(pte_dirty(pte_wrprotect(pte_mkclean(pte))));
WARN_ON(!pte_dirty(pte_wrprotect(pte_mkdirty(pte))));
WARN_ON(!pte_dirty(pte_mkwrite_novma(pte_mkdirty(pte))));
WARN_ON(pte_dirty(pte_mkwrite_novma(pte_mkclean(pte))));
WARN_ON(!(pte_write(pte) && pte_dirty(pte)));
WARN_ON(pte_dirty(pte_wrprotect(pte)));
WARN_ON(!pte_dirty(pte_mkdirty(pte_mkclean(pte))));
!pte_dirty(pte) && !folio_test_dirty(folio))
any_dirty |= pte_dirty(pte);
if (pte_write(entry) || pte_dirty(entry) ||
if (pte_dirty(entry))
if (pte_young(ptent) || pte_dirty(ptent)) {
if (pte_dirty(ptent)) {
if (pte_dirty(ptent)) {
if (pte_dirty(pte))
if (pte_dirty(pte))
VM_WARN_ON_ONCE(is_zero_pfn(pte_pfn(pte)) && pte_dirty(pte));
return pte_dirty(pte);
if (!pte_dirty(entry) && !pte_write(entry))
if (pte_dirty(pteval))
if (pte_dirty(pteval))
if (pte_dirty(pteval))
if (pte_dirty(pteval))
if (pte_dirty(pteval))
if (pte_dirty(fw.pte))
bool writable = pte_dirty(pteval);
if (pte_dirty(orig_src_pte))
if (pte_dirty(ptent))
if (pte_dirty(ptent))