diff options
-rw-r--r-- | include/linux/rmap.h | 6 | ||||
-rw-r--r-- | mm/rmap.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index bf116d0dbf23..8dff2ffab82c 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -112,6 +112,12 @@ int page_mkclean(struct page *); | |||
112 | */ | 112 | */ |
113 | int try_to_munlock(struct page *); | 113 | int try_to_munlock(struct page *); |
114 | 114 | ||
115 | /* | ||
116 | * Called by memory-failure.c to kill processes. | ||
117 | */ | ||
118 | struct anon_vma *page_lock_anon_vma(struct page *page); | ||
119 | void page_unlock_anon_vma(struct anon_vma *anon_vma); | ||
120 | |||
115 | #else /* !CONFIG_MMU */ | 121 | #else /* !CONFIG_MMU */ |
116 | 122 | ||
117 | #define anon_vma_init() do {} while (0) | 123 | #define anon_vma_init() do {} while (0) |
@@ -191,7 +191,7 @@ void __init anon_vma_init(void) | |||
191 | * Getting a lock on a stable anon_vma from a page off the LRU is | 191 | * Getting a lock on a stable anon_vma from a page off the LRU is |
192 | * tricky: page_lock_anon_vma rely on RCU to guard against the races. | 192 | * tricky: page_lock_anon_vma rely on RCU to guard against the races. |
193 | */ | 193 | */ |
194 | static struct anon_vma *page_lock_anon_vma(struct page *page) | 194 | struct anon_vma *page_lock_anon_vma(struct page *page) |
195 | { | 195 | { |
196 | struct anon_vma *anon_vma; | 196 | struct anon_vma *anon_vma; |
197 | unsigned long anon_mapping; | 197 | unsigned long anon_mapping; |
@@ -211,7 +211,7 @@ out: | |||
211 | return NULL; | 211 | return NULL; |
212 | } | 212 | } |
213 | 213 | ||
214 | static void page_unlock_anon_vma(struct anon_vma *anon_vma) | 214 | void page_unlock_anon_vma(struct anon_vma *anon_vma) |
215 | { | 215 | { |
216 | spin_unlock(&anon_vma->lock); | 216 | spin_unlock(&anon_vma->lock); |
217 | rcu_read_unlock(); | 217 | rcu_read_unlock(); |