mm/ksm: move [set_]page_stable_node from ksm.h to ksm.c
[linux-2.6-microblaze.git] / mm / ksm.c
index 7d6558f..e2d2886 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -840,6 +840,17 @@ static int unmerge_ksm_pages(struct vm_area_struct *vma,
        return err;
 }
 
+static inline struct stable_node *page_stable_node(struct page *page)
+{
+       return PageKsm(page) ? page_rmapping(page) : NULL;
+}
+
+static inline void set_page_stable_node(struct page *page,
+                                       struct stable_node *stable_node)
+{
+       page->mapping = (void *)((unsigned long)stable_node | PAGE_MAPPING_KSM);
+}
+
 #ifdef CONFIG_SYSFS
 /*
  * Only called through the sysfs control interface: