diff options
Diffstat (limited to 'include/linux/rmap.h')
-rw-r--r-- | include/linux/rmap.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index fed6f5e0b411..955667e6a52d 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -117,6 +117,19 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); | |||
117 | */ | 117 | */ |
118 | int page_mkclean(struct page *); | 118 | int page_mkclean(struct page *); |
119 | 119 | ||
120 | #ifdef CONFIG_UNEVICTABLE_LRU | ||
121 | /* | ||
122 | * called in munlock()/munmap() path to check for other vmas holding | ||
123 | * the page mlocked. | ||
124 | */ | ||
125 | int try_to_munlock(struct page *); | ||
126 | #else | ||
127 | static inline int try_to_munlock(struct page *page) | ||
128 | { | ||
129 | return 0; /* a.k.a. SWAP_SUCCESS */ | ||
130 | } | ||
131 | #endif | ||
132 | |||
120 | #else /* !CONFIG_MMU */ | 133 | #else /* !CONFIG_MMU */ |
121 | 134 | ||
122 | #define anon_vma_init() do {} while (0) | 135 | #define anon_vma_init() do {} while (0) |
@@ -140,5 +153,6 @@ static inline int page_mkclean(struct page *page) | |||
140 | #define SWAP_SUCCESS 0 | 153 | #define SWAP_SUCCESS 0 |
141 | #define SWAP_AGAIN 1 | 154 | #define SWAP_AGAIN 1 |
142 | #define SWAP_FAIL 2 | 155 | #define SWAP_FAIL 2 |
156 | #define SWAP_MLOCK 3 | ||
143 | 157 | ||
144 | #endif /* _LINUX_RMAP_H */ | 158 | #endif /* _LINUX_RMAP_H */ |