aboutsummaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 941bf82e8961..ad416afb2061 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -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 */
1496void drop_anon_vma(struct anon_vma *anon_vma) 1496void 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)) {