diff options
-rw-r--r-- | include/linux/rmap.h | 15 | ||||
-rw-r--r-- | mm/rmap.c | 4 |
2 files changed, 2 insertions, 17 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 830e65dc01ee..590c291a8cd9 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -218,20 +218,7 @@ int try_to_munlock(struct page *); | |||
218 | /* | 218 | /* |
219 | * Called by memory-failure.c to kill processes. | 219 | * Called by memory-failure.c to kill processes. |
220 | */ | 220 | */ |
221 | struct anon_vma *__page_lock_anon_vma(struct page *page); | 221 | struct anon_vma *page_lock_anon_vma(struct page *page); |
222 | |||
223 | static inline struct anon_vma *page_lock_anon_vma(struct page *page) | ||
224 | { | ||
225 | struct anon_vma *anon_vma; | ||
226 | |||
227 | __cond_lock(RCU, anon_vma = __page_lock_anon_vma(page)); | ||
228 | |||
229 | /* (void) is needed to make gcc happy */ | ||
230 | (void) __cond_lock(&anon_vma->root->lock, anon_vma); | ||
231 | |||
232 | return anon_vma; | ||
233 | } | ||
234 | |||
235 | void page_unlock_anon_vma(struct anon_vma *anon_vma); | 222 | void page_unlock_anon_vma(struct anon_vma *anon_vma); |
236 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); | 223 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); |
237 | 224 | ||
@@ -323,7 +323,7 @@ void __init anon_vma_init(void) | |||
323 | * Getting a lock on a stable anon_vma from a page off the LRU is | 323 | * Getting a lock on a stable anon_vma from a page off the LRU is |
324 | * tricky: page_lock_anon_vma rely on RCU to guard against the races. | 324 | * tricky: page_lock_anon_vma rely on RCU to guard against the races. |
325 | */ | 325 | */ |
326 | struct anon_vma *__page_lock_anon_vma(struct page *page) | 326 | struct anon_vma *page_lock_anon_vma(struct page *page) |
327 | { | 327 | { |
328 | struct anon_vma *anon_vma, *root_anon_vma; | 328 | struct anon_vma *anon_vma, *root_anon_vma; |
329 | unsigned long anon_mapping; | 329 | unsigned long anon_mapping; |
@@ -357,8 +357,6 @@ out: | |||
357 | } | 357 | } |
358 | 358 | ||
359 | void page_unlock_anon_vma(struct anon_vma *anon_vma) | 359 | void page_unlock_anon_vma(struct anon_vma *anon_vma) |
360 | __releases(&anon_vma->root->lock) | ||
361 | __releases(RCU) | ||
362 | { | 360 | { |
363 | anon_vma_unlock(anon_vma); | 361 | anon_vma_unlock(anon_vma); |
364 | rcu_read_unlock(); | 362 | rcu_read_unlock(); |