From patchwork Mon Sep 9 20:16:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Veaceslav Falico X-Patchwork-Id: 273689 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E572D2C00DB for ; Tue, 10 Sep 2013 06:17:21 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756071Ab3IIURQ (ORCPT ); Mon, 9 Sep 2013 16:17:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2480 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753837Ab3IIURM (ORCPT ); Mon, 9 Sep 2013 16:17:12 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r89KH60H011329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Sep 2013 16:17:07 -0400 Received: from darkmag.usersys.redhat.com (dhcp-27-102.brq.redhat.com [10.34.27.102]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r89KGMDZ016628; Mon, 9 Sep 2013 16:17:05 -0400 From: Veaceslav Falico To: netdev@vger.kernel.org Cc: jiri@resnulli.us, Veaceslav Falico , Jay Vosburgh , Andy Gospodarek Subject: [PATCH net-next 23/26] bonding: remove slave lists Date: Mon, 9 Sep 2013 22:16:41 +0200 Message-Id: <1378757804-3159-24-git-send-email-vfalico@redhat.com> In-Reply-To: <1378757804-3159-1-git-send-email-vfalico@redhat.com> References: <1378757804-3159-1-git-send-email-vfalico@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org And all the initialization. CC: Jay Vosburgh CC: Andy Gospodarek Signed-off-by: Veaceslav Falico --- drivers/net/bonding/bond_main.c | 4 ---- drivers/net/bonding/bonding.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 65eae12..707b0bc 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -972,7 +972,6 @@ void bond_select_active_slave(struct bonding *bond) */ static void bond_attach_slave(struct bonding *bond, struct slave *new_slave) { - list_add_tail_rcu(&new_slave->list, &bond->slave_list); bond->slave_cnt++; } @@ -988,7 +987,6 @@ static void bond_attach_slave(struct bonding *bond, struct slave *new_slave) */ static void bond_detach_slave(struct bonding *bond, struct slave *slave) { - list_del_rcu(&slave->list); bond->slave_cnt--; } @@ -1374,7 +1372,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) res = -ENOMEM; goto err_undo_flags; } - INIT_LIST_HEAD(&new_slave->list); /* * Set the new_slave's queue_id to be zero. Queue ID mapping * is set via sysfs or module option if desired. @@ -4022,7 +4019,6 @@ static void bond_setup(struct net_device *bond_dev) /* initialize rwlocks */ rwlock_init(&bond->lock); rwlock_init(&bond->curr_slave_lock); - INIT_LIST_HEAD(&bond->slave_list); bond->params = bonding_defaults; /* Initialize pointers */ diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 9329509..0e8e00e 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -167,7 +167,6 @@ struct bond_parm_tbl { struct slave { struct net_device *dev; /* first - useful for panic debug */ - struct list_head list; struct bonding *bond; /* our master */ int delay; unsigned long jiffies; @@ -207,7 +206,6 @@ struct slave { */ struct bonding { struct net_device *dev; /* first - useful for panic debug */ - struct list_head slave_list; struct slave *curr_active_slave; struct slave *current_arp_slave; struct slave *primary_slave;