Revert "net_sched: hold netns refcnt for each action"
This reverts commit ceffcc5e25
.
If we hold that refcnt, the netns can never be destroyed until
all actions are destroyed by user, this breaks our netns design
which we expect all actions are destroyed when we destroy the
whole netns.
Cc: Lucas Bates <lucasb@mojatatu.com>
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:

committed by
David S. Miller

parent
8f56246291
commit
c7e460ce55
@@ -14,7 +14,6 @@
|
||||
struct tcf_idrinfo {
|
||||
spinlock_t lock;
|
||||
struct idr action_idr;
|
||||
struct net *net;
|
||||
};
|
||||
|
||||
struct tc_action_ops;
|
||||
@@ -106,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, struct net *net)
|
||||
const struct tc_action_ops *ops)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
@@ -114,7 +113,6 @@ 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;
|
||||
|
Reference in New Issue
Block a user