diff options
Diffstat (limited to 'include/linux/ksm.h')
-rw-r--r-- | include/linux/ksm.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/ksm.h b/include/linux/ksm.h index bed5f16ba827..43bdab769fc3 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h | |||
@@ -94,12 +94,6 @@ void ksm_migrate_page(struct page *newpage, struct page *oldpage); | |||
94 | 94 | ||
95 | #else /* !CONFIG_KSM */ | 95 | #else /* !CONFIG_KSM */ |
96 | 96 | ||
97 | static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | ||
98 | unsigned long end, int advice, unsigned long *vm_flags) | ||
99 | { | ||
100 | return 0; | ||
101 | } | ||
102 | |||
103 | static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm) | 97 | static inline int ksm_fork(struct mm_struct *mm, struct mm_struct *oldmm) |
104 | { | 98 | { |
105 | return 0; | 99 | return 0; |
@@ -114,6 +108,13 @@ static inline int PageKsm(struct page *page) | |||
114 | return 0; | 108 | return 0; |
115 | } | 109 | } |
116 | 110 | ||
111 | #ifdef CONFIG_MMU | ||
112 | static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | ||
113 | unsigned long end, int advice, unsigned long *vm_flags) | ||
114 | { | ||
115 | return 0; | ||
116 | } | ||
117 | |||
117 | static inline struct page *ksm_might_need_to_copy(struct page *page, | 118 | static inline struct page *ksm_might_need_to_copy(struct page *page, |
118 | struct vm_area_struct *vma, unsigned long address) | 119 | struct vm_area_struct *vma, unsigned long address) |
119 | { | 120 | { |
@@ -140,6 +141,7 @@ static inline int rmap_walk_ksm(struct page *page, int (*rmap_one)(struct page*, | |||
140 | static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage) | 141 | static inline void ksm_migrate_page(struct page *newpage, struct page *oldpage) |
141 | { | 142 | { |
142 | } | 143 | } |
144 | #endif /* CONFIG_MMU */ | ||
143 | #endif /* !CONFIG_KSM */ | 145 | #endif /* !CONFIG_KSM */ |
144 | 146 | ||
145 | #endif /* __LINUX_KSM_H */ | 147 | #endif /* __LINUX_KSM_H */ |