diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index a35ab8c27866..3917b84700b4 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c @@ -536,6 +536,9 @@ static int route4_change(struct net *net, struct sk_buff *in_skb, fp = &pfp->next, pfp = rtnl_dereference(*fp)) { if (pfp == fold) { rcu_assign_pointer(*fp, fold->next); + tcf_unbind_filter(tp, &fold->res); + tcf_exts_get_net(&fold->exts); + tcf_queue_work(&fold->rwork, route4_delete_filter_work); break; } } @@ -544,11 +547,6 @@ static int route4_change(struct net *net, struct sk_buff *in_skb, route4_reset_fastmap(head); *arg = f; - if (fold) { - tcf_unbind_filter(tp, &fold->res); - tcf_exts_get_net(&fold->exts); - tcf_queue_work(&fold->rwork, route4_delete_filter_work); - } return 0; errout: