From patchwork Thu Sep 6 04:21:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 182003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6A4002C0089 for ; Thu, 6 Sep 2012 14:22:03 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750915Ab2IFEV4 (ORCPT ); Thu, 6 Sep 2012 00:21:56 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:44814 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838Ab2IFEVz (ORCPT ); Thu, 6 Sep 2012 00:21:55 -0400 Received: by qaas11 with SMTP id s11so1207256qaa.19 for ; Wed, 05 Sep 2012 21:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=1QT5PNfhDq9zyQIHd96wYxM8f1eTccVNrhiwXd/QaNY=; b=WZ9H277LOFs/bJvBn1K4ea4iepKSL+B9ZJrWcC4NZGHjD0HTMKCSageOvccpOTke4j /VUFLrSLaGVorfNXvcgxW/1mUDI8bnP/NijywjXBjiPXO1u3u/u1t8TY/OjxXzNwpSje TIM2rEl963g2wjGokrZxBhOtSrYuA2YMTDJCenC1R9mjcdh6vYeXnRNN569N5ZC/IKI4 2ZJhx8edUlKvU6g8n4E/4Qzoe9y5nS7T3+OZkBc4u6X6jHN5wa5gxQQO4MhmZnDYCkSm YQhRf3ShpQ5+1bgqWo2KJgiVQjWhiqXDECq4lL/AjVp4YaP/s8eSCrqKW6Xug9qXXz55 JH5w== MIME-Version: 1.0 Received: by 10.224.185.15 with SMTP id cm15mr2526081qab.8.1346905313884; Wed, 05 Sep 2012 21:21:53 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Wed, 5 Sep 2012 21:21:53 -0700 (PDT) Date: Thu, 6 Sep 2012 12:21:53 +0800 Message-ID: Subject: [PATCH] ipvs: use list_del_init instead of list_del/INIT_LIST_HEAD From: Wei Yongjun To: wensong@linux-vs.org, horms@verge.net.au, ja@ssi.bg, pablo@netfilter.org, kaber@trash.net Cc: yongjun_wei@trendmicro.com.cn, lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Wei Yongjun 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 --- net/netfilter/ipvs/ip_vs_ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index f51013c..9d9f83e 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;