From 68bf84ff4a72425ec25b6670e25bd11f92e33e1a Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 16 Dec 2009 10:06:39 -0800 Subject: [PATCH] --- yaml --- r: 176763 b: refs/heads/master c: 9cfc86249f32d984339c6d1f8a1fd1326989b3b8 h: refs/heads/master i: 176761: 2e4d189f9327e5bcd7ce8b64fa1a01f28a9ade6a 176759: adb5bbd9f4e289ea6605f1161369f7c8e3a86957 v: v3 --- [refs] | 2 +- trunk/include/linux/ksm.h | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index ddb000279411..574ac6cfacba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 243797f59b748f679ab88d456fcc4f92236d724b +refs/heads/master: 9cfc86249f32d984339c6d1f8a1fd1326989b3b8 diff --git a/trunk/include/linux/ksm.h b/trunk/include/linux/ksm.h index bed5f16ba827..43bdab769fc3 100644 --- a/trunk/include/linux/ksm.h +++ b/trunk/include/linux/ksm.h @@ -94,12 +94,6 @@ void ksm_migrate_page(struct page *newpage, struct page *oldpage); #else /* !CONFIG_KSM */ -static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, - unsigned long end, int advice, unsigned long *vm_flags) -{ - return 0; -} - static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm) { return 0; @@ -114,6 +108,13 @@ static inline int PageKsm(struct page *page) return 0; } +#ifdef CONFIG_MMU +static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, + unsigned long end, int advice, unsigned long *vm_flags) +{ + return 0; +} + static inline struct page *ksm_might_need_to_copy(struct page *page, struct vm_area_struct *vma, unsigned long address) { @@ -140,6 +141,7 @@ static inline int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page*, static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage) { } +#endif /* CONFIG_MMU */ #endif /* !CONFIG_KSM */ #endif /* __LINUX_KSM_H */