diff options
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index c61a1bf4e3de..3a1a72990fce 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -15,6 +15,7 @@ | |||
15 | struct tcf_idrinfo { | 15 | struct tcf_idrinfo { |
16 | struct mutex lock; | 16 | struct mutex lock; |
17 | struct idr action_idr; | 17 | struct idr action_idr; |
18 | struct net *net; | ||
18 | }; | 19 | }; |
19 | 20 | ||
20 | struct tc_action_ops; | 21 | struct tc_action_ops; |
@@ -108,7 +109,7 @@ struct tc_action_net { | |||
108 | }; | 109 | }; |
109 | 110 | ||
110 | static inline | 111 | static inline |
111 | int tc_action_net_init(struct tc_action_net *tn, | 112 | int tc_action_net_init(struct net *net, struct tc_action_net *tn, |
112 | const struct tc_action_ops *ops) | 113 | const struct tc_action_ops *ops) |
113 | { | 114 | { |
114 | int err = 0; | 115 | int err = 0; |
@@ -117,6 +118,7 @@ int tc_action_net_init(struct tc_action_net *tn, | |||
117 | if (!tn->idrinfo) | 118 | if (!tn->idrinfo) |
118 | return -ENOMEM; | 119 | return -ENOMEM; |
119 | tn->ops = ops; | 120 | tn->ops = ops; |
121 | tn->idrinfo->net = net; | ||
120 | mutex_init(&tn->idrinfo->lock); | 122 | mutex_init(&tn->idrinfo->lock); |
121 | idr_init(&tn->idrinfo->action_idr); | 123 | idr_init(&tn->idrinfo->action_idr); |
122 | return err; | 124 | return err; |