From patchwork Fri Jan 4 08:48:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1931631 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 909283FF0F for ; Fri, 4 Jan 2013 08:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754521Ab3ADIwy (ORCPT ); Fri, 4 Jan 2013 03:52:54 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:47819 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754238Ab3ADItk (ORCPT ); Fri, 4 Jan 2013 03:49:40 -0500 Received: by mail-ee0-f45.google.com with SMTP id d49so7721174eek.4 for ; Fri, 04 Jan 2013 00:49:38 -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=VQT6m+ei8iMlVa5qfUMwryJEAtHmMv687VGJiWM4Mrt+pVxwz+Hz9EDqE7YsvOJ0NT ZkLRh8rOyu4QEnvw/WsxGHfWZS8PtFJskvHzXkl0ZN7CRmZ4HjE9v3u3ZPjpabO5olSA fi7Wm60PdguATGvyuWdvCYzgR3WTUaWQGb976ByOSxzmhjaAIXkJ8YFtTavA3FcL9AGA KSbMgezc3ZblGYYnwryEelhJHBzgVal4J6N3WdSzZjR6BgvEbnA25UL6zdScRa66IwZH ck2FZrxNY0WcsPxf+Ot1Vyvj1d2ko0xPzn8i5I4N5Vn1ZtKpArfpNRSyGYqbL0qJfB5a T7rQ== X-Received: by 10.14.184.134 with SMTP id s6mr140717429eem.43.1357289378236; Fri, 04 Jan 2013 00:49:38 -0800 (PST) Received: from localhost (ip-89-103-8-129.net.upcbroadband.cz. [89.103.8.129]) by mx.google.com with ESMTPS id 43sm109329814eed.10.2013.01.04.00.49.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 00:49:37 -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 V6 07/15] netpoll: remove usage of dev->master Date: Fri, 4 Jan 2013 09:48:55 +0100 Message-Id: <1357289343-817-8-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357289343-817-1-git-send-email-jiri@resnulli.us> References: <1357289343-817-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQnPjduPFO8PMF3ulQoMPDzozvsieaMpRgNbTuXBL6gkEIz3cKK7A9VZNror6DAmLmvPP40Y 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;