On Fri, Oct 04, 2024 at 10:32:44AM -0700, Andrew Morton wrote: > static __always_inline void SetPageAnonExclusive(struct page *page) > { > - VM_BUG_ON_PGFLAGS(PageAnonNotKsm(page), page); > +// VM_BUG_ON_PGFLAGS(PageAnonNotKsm(page), page); > VM_BUG_ON_PGFLAGS(PageHuge(page) && !PageHead(page), page); This instead please: diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 84746da35f79..2b2defc2732f 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -1131,14 +1131,14 @@ static __always_inline int PageAnonExclusive(const struct page *page) static __always_inline void SetPageAnonExclusive(struct page *page) { - VM_BUG_ON_PGFLAGS(PageAnonNotKsm(page), page); + VM_BUG_ON_PGFLAGS(!PageAnonNotKsm(page), page); VM_BUG_ON_PGFLAGS(PageHuge(page) && !PageHead(page), page); set_bit(PG_anon_exclusive, &PF_ANY(page, 1)->flags); } static __always_inline void ClearPageAnonExclusive(struct page *page) { - VM_BUG_ON_PGFLAGS(PageAnonNotKsm(page), page); + VM_BUG_ON_PGFLAGS(!PageAnonNotKsm(page), page); VM_BUG_ON_PGFLAGS(PageHuge(page) && !PageHead(page), page); clear_bit(PG_anon_exclusive, &PF_ANY(page, 1)->flags); }