diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-03-22 19:32:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:44:03 -0400 |
commit | 9e60109f125013b6c571f399a15a8b0fe1ffa4e6 (patch) | |
tree | 52d34958e82e5649b737e21e453516a3ecd365d3 /mm/rmap.c | |
parent | 7bc32f6f90dae67730645da67bfd44304f810f93 (diff) |
mm: rename drop_anon_vma() to put_anon_vma()
The normal code pattern used in the kernel is: get/put.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -278,7 +278,7 @@ static void anon_vma_unlink(struct anon_vma_chain *anon_vma_chain) | |||
278 | if (empty) { | 278 | if (empty) { |
279 | /* We no longer need the root anon_vma */ | 279 | /* We no longer need the root anon_vma */ |
280 | if (anon_vma->root != anon_vma) | 280 | if (anon_vma->root != anon_vma) |
281 | drop_anon_vma(anon_vma->root); | 281 | put_anon_vma(anon_vma->root); |
282 | anon_vma_free(anon_vma); | 282 | anon_vma_free(anon_vma); |
283 | } | 283 | } |
284 | } | 284 | } |
@@ -1493,7 +1493,7 @@ int try_to_munlock(struct page *page) | |||
1493 | * we know we are the last user, nobody else can get a reference and we | 1493 | * we know we are the last user, nobody else can get a reference and we |
1494 | * can do the freeing without the lock. | 1494 | * can do the freeing without the lock. |
1495 | */ | 1495 | */ |
1496 | void drop_anon_vma(struct anon_vma *anon_vma) | 1496 | void put_anon_vma(struct anon_vma *anon_vma) |
1497 | { | 1497 | { |
1498 | BUG_ON(atomic_read(&anon_vma->external_refcount) <= 0); | 1498 | BUG_ON(atomic_read(&anon_vma->external_refcount) <= 0); |
1499 | if (atomic_dec_and_lock(&anon_vma->external_refcount, &anon_vma->root->lock)) { | 1499 | if (atomic_dec_and_lock(&anon_vma->external_refcount, &anon_vma->root->lock)) { |