aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_basic.c
diff options
context:
space:
mode:
authorCong Wang <[email protected]>2019-02-21 05:37:42 +0000
committerDavid S. Miller <[email protected]>2019-02-22 23:26:51 +0000
commit14215108a1fd7e002c0a1f9faf8fbaf41fdda50d (patch)
treec56c457e345a93a42c47d67d58961a534b3e663e /net/sched/cls_basic.c
parentMerge tag 'wireless-drivers-next-for-davem-2019-02-22' of git://git.kernel.or... (diff)
downloadkernel-14215108a1fd7e002c0a1f9faf8fbaf41fdda50d.tar.gz
kernel-14215108a1fd7e002c0a1f9faf8fbaf41fdda50d.zip
net_sched: initialize net pointer inside tcf_exts_init()
For tcindex filter, it is too late to initialize the net pointer in tcf_exts_validate(), as tcf_exts_get_net() requires a non-NULL net pointer. We can just move its initialization into tcf_exts_init(), which just requires an additional parameter. This makes the code in tcindex_alloc_perfect_hash() prettier. Cc: Jamal Hadi Salim <[email protected]> Cc: Jiri Pirko <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sched/cls_basic.c')
-rw-r--r--net/sched/cls_basic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 2383f449d2bc..687b0af67878 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -199,7 +199,7 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
if (!fnew)
return -ENOBUFS;
- err = tcf_exts_init(&fnew->exts, TCA_BASIC_ACT, TCA_BASIC_POLICE);
+ err = tcf_exts_init(&fnew->exts, net, TCA_BASIC_ACT, TCA_BASIC_POLICE);
if (err < 0)
goto errout;