From patchwork Wed Jan 2 12:28:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1923281 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 791C63FE37 for ; Wed, 2 Jan 2013 12:31:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752787Ab3ABM3L (ORCPT ); Wed, 2 Jan 2013 07:29:11 -0500 Received: from mail-ea0-f172.google.com ([209.85.215.172]:47074 "EHLO mail-ea0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752782Ab3ABM3I (ORCPT ); Wed, 2 Jan 2013 07:29:08 -0500 Received: by mail-ea0-f172.google.com with SMTP id a1so5913971eaa.3 for ; Wed, 02 Jan 2013 04:29:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=ix52ltu0uGqbidhiosIn9D/z6gly3mC6Bwd44YAQmiM=; b=b7rJY0b66s4+x6K18rEOsDkA8Omw+c5/yZfkOaFp50ORT9mTVO5RVca+2tRJ9ESZvP ogWmXeBDMxZWd5S7NzJJKXbJ4+iNkgJ+XlhkvrFliA+08dA13Wb1mP8YoC9hWsgi51Kg yZfhf0dfU4bcEivNHtDomUTB5u1DdR86qeDoDMfvmvzveU2itTofKY8XWrq1sZG/zosh QEhrUHoqVm8L0AEpVZv5LmoiQuwGFWLQOn0rAOSFuUujTPj6utn4S9KcyLr9CfWxYvbo +B/u7fo8JPKHe4ai4GltErqWtfaEG2WgoRQP6nxj60Mkjpnhz5awjisE5/BjqCvAY5gt 2RNg== X-Received: by 10.14.181.135 with SMTP id l7mr14223437eem.19.1357129746985; Wed, 02 Jan 2013 04:29:06 -0800 (PST) Received: from localhost (sun-0.pirko.cz. [84.16.102.25]) by mx.google.com with ESMTPS id 43sm97248685eed.10.2013.01.02.04.29.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Jan 2013 04:29:06 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, faisal.latif@intel.com, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, fubar@us.ibm.com, andy@greyhouse.net, divy@chelsio.com, jitendra.kalsaria@qlogic.com, sony.chacko@qlogic.com, linux-driver@qlogic.com, kaber@trash.net, ursula.braun@de.ibm.com, blaschka@linux.vnet.ibm.com, linux390@de.ibm.com, shemminger@vyatta.com, bhutchings@solarflare.com, therbert@google.com, xiyou.wangcong@gmail.com, joe@perches.com, gregory.v.rose@intel.com, john.r.fastabend@intel.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux-foundation.org, fbl@redhat.com Subject: [patch net-next V5 07/15] netpoll: remove usage of dev->master Date: Wed, 2 Jan 2013 13:28:28 +0100 Message-Id: <1357129716-2450-8-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357129716-2450-1-git-send-email-jiri@resnulli.us> References: <1357129716-2450-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQmGitnO4OMoeRzLTPaY15mXS4RX1hBe2DjTYfvuucTUN7q5k5HVCr6sJ5SG3qzqfgMpkd11 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Jiri Pirko --- net/core/netpoll.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 3151acf..d2bda8e 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -210,9 +210,12 @@ static void netpoll_poll_dev(struct net_device *dev) if (dev->flags & IFF_SLAVE) { if (ni) { - struct net_device *bond_dev = dev->master; + struct net_device *bond_dev; struct sk_buff *skb; - struct netpoll_info *bond_ni = rcu_dereference_bh(bond_dev->npinfo); + struct netpoll_info *bond_ni; + + bond_dev = netdev_master_upper_dev_get_rcu(dev); + bond_ni = rcu_dereference_bh(bond_dev->npinfo); while ((skb = skb_dequeue(&ni->arp_tx))) { skb->dev = bond_dev; skb_queue_tail(&bond_ni->arp_tx, skb); @@ -815,7 +818,7 @@ int netpoll_setup(struct netpoll *np) return -ENODEV; } - if (ndev->master) { + if (netdev_master_upper_dev_get(ndev)) { np_err(np, "%s is a slave device, aborting\n", np->dev_name); err = -EBUSY; goto put;