lkml.org 
[lkml]   [2012]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] mm: use list_move_tail instead of list_del/list_add_tail
From
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
mm/rmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index 0f3b7cd..6333654 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -307,8 +307,7 @@ void anon_vma_moveto_tail(struct vm_area_struct *dst)
struct anon_vma *anon_vma = pavc->anon_vma;
VM_BUG_ON(pavc->vma != dst);
root = lock_anon_vma_root(root, anon_vma);
- list_del(&pavc->same_anon_vma);
- list_add_tail(&pavc->same_anon_vma, &anon_vma->head);
+ list_move_tail(&pavc->same_anon_vma, &anon_vma->head);
}
unlock_anon_vma_root(root);
}



\
 
 \ /
  Last update: 2012-09-05 09:22    [W:0.050 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site