[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240325124904.398913-15-alexs@kernel.org>
Date: Mon, 25 Mar 2024 20:49:01 +0800
From: alexs@...nel.org
To: Matthew Wilcox <willy@...radead.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Izik Eidus <izik.eidus@...ellosystems.com>,
david@...hat.com,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
ryncsn@...il.com
Cc: "Alex Shi (tencent)" <alexs@...nel.org>,
Hugh Dickins <hughd@...gle.com>,
Chris Wright <chrisw@...s-sol.org>
Subject: [PATCH v3 14/14] mm/ksm: remove set_page_stable_node
From: "Alex Shi (tencent)" <alexs@...nel.org>
Remove the func since all caller are gone. Also remove the
VM_BUG_ON_PAGE() because it's not applicable for a folio.
Signed-off-by: Alex Shi (tencent) <alexs@...nel.org>
To: linux-kernel@...r.kernel.org
To: linux-mm@...ck.org
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Izik Eidus <izik.eidus@...ellosystems.com>
Cc: Matthew Wilcox <willy@...radead.org>
Cc: Andrea Arcangeli <aarcange@...hat.com>
Cc: Hugh Dickins <hughd@...gle.com>
Cc: Chris Wright <chrisw@...s-sol.org>
---
mm/ksm.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/mm/ksm.c b/mm/ksm.c
index d7c4cc4a0cc1..136909f0c5d5 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1094,17 +1094,10 @@ static inline struct ksm_stable_node *page_stable_node(struct page *page)
return folio_stable_node(page_folio(page));
}
-static inline void set_page_stable_node(struct page *page,
- struct ksm_stable_node *stable_node)
-{
- VM_BUG_ON_PAGE(PageAnon(page) && PageAnonExclusive(page), page);
- page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM);
-}
-
static inline void folio_set_stable_node(struct folio *folio,
struct ksm_stable_node *stable_node)
{
- set_page_stable_node(&folio->page, stable_node);
+ folio->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM);
}
#ifdef CONFIG_SYSFS
--
2.43.0
Powered by blists - more mailing lists