public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: Randy Dunlap <rdunlap@infradead•org>, David Miller <davem@davemloft•net>
Cc: Vitaly Lavrov <lve@guap•ru>,
	Thierry Reding <thierry.reding@gmail•com>,
	linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Mark Brown <broonie@kernel•org>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	Jamal Hadi Salim <jhs@mojatatu•com>
Subject: [PATCH net-next] em_ipset: use dev_net() accessor
Date: Wed, 16 Oct 2013 17:29:34 -0700	[thread overview]
Message-ID: <20131016172934.7913a297@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <525F2D7D.7010708@infradead.org>

Randy found that if network namespace not enabled then
nd_net does not exist and would cause compilation failure.

This is handled correctly by using the dev_net() macro.

Signed-off-by: Stephen Hemminger <stephen@networkplumber•org>
Acked-by: Randy Dunlap <rdunlap@infradead•org>


--- a/net/sched/em_ipset.c	2013-10-06 14:48:25.030449222 -0700
+++ b/net/sched/em_ipset.c	2013-10-16 15:38:05.030278287 -0700
@@ -24,7 +24,7 @@ static int em_ipset_change(struct tcf_pr
 {
 	struct xt_set_info *set = data;
 	ip_set_id_t index;
-	struct net *net = qdisc_dev(tp->q)->nd_net;
+	struct net *net = dev_net(qdisc_dev(tp->q));
 
 	if (data_len != sizeof(*set))
 		return -EINVAL;
@@ -46,7 +46,7 @@ static void em_ipset_destroy(struct tcf_
 {
 	const struct xt_set_info *set = (const void *) em->data;
 	if (set) {
-		ip_set_nfnl_put(qdisc_dev(p->q)->nd_net, set->index);
+		ip_set_nfnl_put(dev_net(qdisc_dev(p->q)), set->index);
 		kfree((void *) em->data);
 	}
 }

  reply	other threads:[~2013-10-17  0:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:51 linux-next: Tree for Oct 16 Thierry Reding
2013-10-16 18:51 ` linux-next: manual merge of the tip tree Thierry Reding
2013-10-16 20:06   ` Peter Zijlstra
2013-10-16 20:14     ` Peter Zijlstra
2013-10-16 20:31       ` NeilBrown
2013-10-16 20:35         ` Peter Zijlstra
2013-10-16 20:51           ` Thierry Reding
2013-10-16 21:00             ` Peter Zijlstra
2013-10-16 20:52         ` Peter Zijlstra
2013-10-17  1:28           ` NeilBrown
2013-10-17  9:23             ` Peter Zijlstra
2013-10-22  2:09               ` NeilBrown
2013-10-16 20:40       ` Thierry Reding
2013-10-16 20:44     ` Thierry Reding
2013-10-16 21:30   ` Peter Zijlstra
2013-10-17  1:29     ` NeilBrown
2013-10-16 18:51 ` linux-next: manual merge of the kvm-arm tree Thierry Reding
2013-10-16 18:58   ` Marc Zyngier
2013-10-16 19:02     ` Christoffer Dall
2013-10-16 19:04       ` Thierry Reding
2013-10-16 19:09         ` Christoffer Dall
2013-10-17 14:55       ` Gleb Natapov
2013-10-17 16:53         ` Christoffer Dall
2013-10-16 21:48 ` linux-next: Tree for Oct 16 (net/sched/em_ipset.c) Randy Dunlap
2013-10-16 22:39   ` Stephen Hemminger
2013-10-17  0:21     ` Randy Dunlap
2013-10-17  0:29       ` Stephen Hemminger [this message]
2013-10-18 20:23         ` [PATCH net-next] em_ipset: use dev_net() accessor David Miller
2013-10-17  0:58 ` linux-next: Tree for Oct 16 Randy Dunlap
2013-10-17  5:12 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131016172934.7913a297@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber$(echo .)org \
    --cc=broonie@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=jhs@mojatatu$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=lve@guap$(echo .)ru \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rdunlap@infradead$(echo .)org \
    --cc=thierry.reding@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox