From: pablo@netfilter.org
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 4/5] ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD
Date: Thu, 13 Sep 2012 13:01:31 +0200 [thread overview]
Message-ID: <1347534092-3579-5-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1347534092-3579-1-git-send-email-pablo@netfilter.org>
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Using list_del_init() instead of list_del() + INIT_LIST_HEAD().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/ipvs/ip_vs_ctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 767cc12..37b38d0 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -539,8 +539,7 @@ static int ip_vs_rs_unhash(struct ip_vs_dest *dest)
* Remove it from the rs_table table.
*/
if (!list_empty(&dest->d_list)) {
- list_del(&dest->d_list);
- INIT_LIST_HEAD(&dest->d_list);
+ list_del_init(&dest->d_list);
}
return 1;
--
1.7.10.4
next prev parent reply other threads:[~2012-09-13 11:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 11:01 [PATCH 0/5] Netfilter updates for net-next pablo
2012-09-13 11:01 ` [PATCH 1/5] netfilter: fix crash during boot if NAT has been compiled built-in pablo
2012-09-13 11:01 ` [PATCH 2/5] netfilter: nf_nat: fix out-of-bounds access in address selection pablo
2012-09-13 11:01 ` [PATCH 3/5] netfilter: nfnetlink_queue: remove pointless conditional before kfree_skb() pablo
2012-09-13 11:01 ` pablo [this message]
2012-09-13 11:01 ` [PATCH 5/5] netfilter: ctnetlink: fix module auto-load in ctnetlink_parse_nat pablo
2012-09-13 18:26 ` [PATCH 0/5] Netfilter updates for net-next David Miller
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=1347534092-3579-5-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/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).