diff options
Diffstat (limited to 'net/bridge/br_vlan.c')
-rw-r--r-- | net/bridge/br_vlan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 8c9297a01947..e84be08b8285 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c | |||
@@ -197,7 +197,7 @@ static void nbp_vlan_rcu_free(struct rcu_head *rcu) | |||
197 | v = container_of(rcu, struct net_bridge_vlan, rcu); | 197 | v = container_of(rcu, struct net_bridge_vlan, rcu); |
198 | WARN_ON(br_vlan_is_master(v)); | 198 | WARN_ON(br_vlan_is_master(v)); |
199 | /* if we had per-port stats configured then free them here */ | 199 | /* if we had per-port stats configured then free them here */ |
200 | if (v->brvlan->stats != v->stats) | 200 | if (v->priv_flags & BR_VLFLAG_PER_PORT_STATS) |
201 | free_percpu(v->stats); | 201 | free_percpu(v->stats); |
202 | v->stats = NULL; | 202 | v->stats = NULL; |
203 | kfree(v); | 203 | kfree(v); |
@@ -264,6 +264,7 @@ static int __vlan_add(struct net_bridge_vlan *v, u16 flags) | |||
264 | err = -ENOMEM; | 264 | err = -ENOMEM; |
265 | goto out_filt; | 265 | goto out_filt; |
266 | } | 266 | } |
267 | v->priv_flags |= BR_VLFLAG_PER_PORT_STATS; | ||
267 | } else { | 268 | } else { |
268 | v->stats = masterv->stats; | 269 | v->stats = masterv->stats; |
269 | } | 270 | } |