mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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 <jhs@mojatatu.com> Cc: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1a25660856
commit
14215108a1
13 changed files with 30 additions and 29 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue