From ab60c94cfc3bc23d96bf958d428b9f7a02a132d1 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 4 Apr 2016 18:14:06 +0300 Subject: vlan_mon: fixed bug --- drivers/vlan_mon/vlan_mon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vlan_mon/vlan_mon.c b/drivers/vlan_mon/vlan_mon.c index f0f2f8b2..6a2c15f4 100644 --- a/drivers/vlan_mon/vlan_mon.c +++ b/drivers/vlan_mon/vlan_mon.c @@ -547,14 +547,14 @@ static int vlan_mon_nl_cmd_del_vlan_mon(struct sk_buff *skb, struct genl_info *i if (!d->proto) rcu_assign_pointer(dev->ml_priv, NULL); } + + if (!d->proto && autoclean) + vlan_dev_clean(d, dev, &list_kill); } if (!d->proto) { list_del(&d->entry); kfree_rcu(d, rcu_head); - - if (ifindex == -1 && autoclean) - vlan_dev_clean(d, dev, &list_kill); } } } -- cgit v1.2.3