diff options
author | David S. Miller <davem@davemloft.net> | 2017-11-04 03:26:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-04 03:26:51 +0300 |
commit | 2a171788ba7bb61995e98e8163204fc7880f63b2 (patch) | |
tree | 4150a94dd08323748116e5051e56ddee830d4812 /include/net/act_api.h | |
parent | bf5345882bd18bc1b4966d170c0491ebe5c9a7d6 (diff) | |
parent | d4c2e9fca5b7db8d315d93a072e65d0847f8e0c5 (diff) | |
download | linux-2a171788ba7bb61995e98e8163204fc7880f63b2.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Files removed in 'net-next' had their license header updated
in 'net'. We take the remove from 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index f5e8c9048fb0..9b8950042c96 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NET_ACT_API_H #define __NET_ACT_API_H @@ -13,6 +14,7 @@ struct tcf_idrinfo { spinlock_t lock; struct idr action_idr; + struct net *net; }; struct tc_action_ops; @@ -103,7 +105,7 @@ struct tc_action_net { static inline int tc_action_net_init(struct tc_action_net *tn, - const struct tc_action_ops *ops) + const struct tc_action_ops *ops, struct net *net) { int err = 0; @@ -111,6 +113,7 @@ int tc_action_net_init(struct tc_action_net *tn, if (!tn->idrinfo) return -ENOMEM; tn->ops = ops; + tn->idrinfo->net = net; spin_lock_init(&tn->idrinfo->lock); idr_init(&tn->idrinfo->action_idr); return err; @@ -121,7 +124,9 @@ void tcf_idrinfo_destroy(const struct tc_action_ops *ops, static inline void tc_action_net_exit(struct tc_action_net *tn) { + rtnl_lock(); tcf_idrinfo_destroy(tn->ops, tn->idrinfo); + rtnl_unlock(); kfree(tn->idrinfo); } |