From: Wei Yongjun Date: Wed, 5 Sep 2012 18:21:53 +0000 (+0000) Subject: ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD X-Git-Tag: v3.7-rc1~145^2~177^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0edd94887d19ad73539477395c17ea0d6898947a;p=platform%2Fkernel%2Flinux-3.10.git ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD 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 Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso --- 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;