[PATCH 9/9] kstaled: export PG_stale in /proc/kpageflags

Michel Lespinasse
2011-09-28T00:49:58Z

Signed-off-by: Michel Lespinasse <walken@google.com>
---
fs/proc/page.c | 4 ++++
include/linux/kernel-page-flags.h | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/proc/page.c b/fs/proc/page.c
index 6d8e6a9..8c3f105 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -159,6 +159,10 @@ u64 stable_page_flags(struct page *page)
u |= kpf_copy_bit(k, KPF_OWNER_PRIVATE, PG_owner_priv_1);
u |= kpf_copy_bit(k, KPF_ARCH, PG_arch_1);

+#ifdef CONFIG_KSTALED
+ u |= kpf_copy_bit(k, KPF_STALE, PG_stale);
+#endif
+
return u;
};

diff --git a/include/linux/kernel-page-flags.h b/include/linux/kernel-page-flags.h
index bd92a89..f64acb3 100644
--- a/include/linux/kernel-page-flags.h
+++ b/include/linux/kernel-page-flags.h
@@ -31,6 +31,8 @@

#define KPF_KSM 21

+#define KPF_STALE 22
+
/* kernel hacking assistances
* WARNING: subject to change, never rely on them!
*/
--
1.7.3.1