Commit 25aeeb04 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds

mm: revert page_lock_anon_vma() lock annotation

Its beyond ugly and gets in the way.
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarHugh Dickins <hughd@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Miller <davem@davemloft.net>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Tony Luck <tony.luck@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3d48ae45
...@@ -218,20 +218,7 @@ int try_to_munlock(struct page *); ...@@ -218,20 +218,7 @@ int try_to_munlock(struct page *);
/* /*
* Called by memory-failure.c to kill processes. * Called by memory-failure.c to kill processes.
*/ */
struct anon_vma *__page_lock_anon_vma(struct page *page); struct anon_vma *page_lock_anon_vma(struct page *page);
static inline struct anon_vma *page_lock_anon_vma(struct page *page)
{
struct anon_vma *anon_vma;
__cond_lock(RCU, anon_vma = __page_lock_anon_vma(page));
/* (void) is needed to make gcc happy */
(void) __cond_lock(&anon_vma->root->lock, anon_vma);
return anon_vma;
}
void page_unlock_anon_vma(struct anon_vma *anon_vma); void page_unlock_anon_vma(struct anon_vma *anon_vma);
int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma);
......
...@@ -323,7 +323,7 @@ void __init anon_vma_init(void) ...@@ -323,7 +323,7 @@ void __init anon_vma_init(void)
* Getting a lock on a stable anon_vma from a page off the LRU is * Getting a lock on a stable anon_vma from a page off the LRU is
* tricky: page_lock_anon_vma rely on RCU to guard against the races. * tricky: page_lock_anon_vma rely on RCU to guard against the races.
*/ */
struct anon_vma *__page_lock_anon_vma(struct page *page) struct anon_vma *page_lock_anon_vma(struct page *page)
{ {
struct anon_vma *anon_vma, *root_anon_vma; struct anon_vma *anon_vma, *root_anon_vma;
unsigned long anon_mapping; unsigned long anon_mapping;
...@@ -357,8 +357,6 @@ struct anon_vma *__page_lock_anon_vma(struct page *page) ...@@ -357,8 +357,6 @@ struct anon_vma *__page_lock_anon_vma(struct page *page)
} }
void page_unlock_anon_vma(struct anon_vma *anon_vma) void page_unlock_anon_vma(struct anon_vma *anon_vma)
__releases(&anon_vma->root->lock)
__releases(RCU)
{ {
anon_vma_unlock(anon_vma); anon_vma_unlock(anon_vma);
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment