linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyj.lk@gmail.com>
To: akpm@linux-foundation.org
Cc: yongjun_wei@trendmicro.com.cn, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] mm: use list_move_tail instead of list_del/list_add_tail
Date: Wed, 5 Sep 2012 14:36:54 +0800	[thread overview]
Message-ID: <CAPgLHd-3Uwj1Uf31xqPO8LyYT0DS2Tcb1fa5KTYXdATEOHT9qw@mail.gmail.com> (raw)

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);
 }


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2012-09-05  6:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPgLHd-3Uwj1Uf31xqPO8LyYT0DS2Tcb1fa5KTYXdATEOHT9qw@mail.gmail.com \
    --to=weiyj.lk@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).