From: Matthew Wilcox Date: Fri, 4 Oct 2024 17:43:52 +0000 (+0100) Subject: mm-add-pageanonnotksm-fix X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bb7e9fff90d3c1478bb8f48118166d613aafa858;p=users%2Fjedix%2Flinux-maple.git mm-add-pageanonnotksm-fix fix assertions Link: https://lkml.kernel.org/r/ZwApWPER7caIA_N3@casper.infradead.org Signed-off-by: Matthew Wilcox Cc: Alex Shi Cc: Marek Szyprowski Signed-off-by: Andrew Morton --- diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index dbca42c9c53ca..1fcef06a2d316 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -1144,14 +1144,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); }