summaryrefslogtreecommitdiffstats
path: root/kernel/net/sched/em_ipset.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-10-04 21:59:39 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2013-10-04 21:59:39 +0200
commit4e80b0e616c12cad14643913347c8d799e65d19d (patch)
treeb6ec67c9570e76ce4fe1ed74466c9180d90000eb /kernel/net/sched/em_ipset.c
parentf0228547f57fd85881f0447e1f80a08bf3232b81 (diff)
Use dev_net() instead of the direct access to ->nd_net
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.
Diffstat (limited to 'kernel/net/sched/em_ipset.c')
-rw-r--r--kernel/net/sched/em_ipset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/net/sched/em_ipset.c b/kernel/net/sched/em_ipset.c
index 1ac41d3..527aeb7 100644
--- a/kernel/net/sched/em_ipset.c
+++ b/kernel/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);
}
}