diff mbox

[2/3] net: sched: Use dev_net() instead of the direct access to ->nd_net

Message ID 1382089317-24311-3-git-send-email-kadlec@blackhole.kfki.hu
State Not Applicable
Headers show

Commit Message

Jozsef Kadlecsik Oct. 18, 2013, 9:41 a.m. UTC
We have to use dev_net() instead of the direct access to ->nd_net,
otherwise compilation fails if NET_NS is not enabled. Reported by
the kbuild test robot.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
---
 net/sched/em_ipset.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Eric Dumazet Oct. 18, 2013, 10:44 a.m. UTC | #1
On Fri, 2013-10-18 at 11:41 +0200, Jozsef Kadlecsik wrote:
> We have to use dev_net() instead of the direct access to ->nd_net,
> otherwise compilation fails if NET_NS is not enabled. Reported by
> the kbuild test robot.
> 
> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> ---

It seems Stephen took care of this :

http://patchwork.ozlabs.org/patch/284049/



--
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
Pablo Neira Ayuso Oct. 22, 2013, 8:23 a.m. UTC | #2
On Fri, Oct 18, 2013 at 03:44:09AM -0700, Eric Dumazet wrote:
> On Fri, 2013-10-18 at 11:41 +0200, Jozsef Kadlecsik wrote:
> > We have to use dev_net() instead of the direct access to ->nd_net,
> > otherwise compilation fails if NET_NS is not enabled. Reported by
> > the kbuild test robot.
> > 
> > Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
> > ---
> 
> It seems Stephen took care of this :
> 
> http://patchwork.ozlabs.org/patch/284049/

Thanks Eric, I have skipped this one.
--
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 mbox

Patch

diff --git a/net/sched/em_ipset.c b/net/sched/em_ipset.c
index 1ac41d3..527aeb7 100644
--- a/net/sched/em_ipset.c
+++ b/net/sched/em_ipset.c
@@ -24,7 +24,7 @@  static int em_ipset_change(struct tcf_proto *tp, void *data, int data_len,
 {
 	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_proto *p, struct tcf_ematch *em)
 {
 	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);
 	}
 }