On Wed, Oct 25, 2023 at 04:12:37PM -0400, Gregory Price wrote: > +++ b/fs/proc/page.c > @@ -188,20 +188,31 @@ u64 stable_page_flags(struct page *page) > u |= 1 << KPF_SLAB; > > u |= kpf_copy_bit(k, KPF_ERROR, PG_error); > - u |= kpf_copy_bit(k, KPF_DIRTY, PG_dirty); > + > + if (PageDirty(page)) > + u |= 1 << KPF_DIRTY; This is not the way to do it. At the beginning of the function, add: struct folio *folio = page_folio(page); Then use folio_test_XXX istead of PageXXX().