net_sched: remove useless NULL to tp->root

There is no need to NULL tp->root in ->destroy(), since tp is
going to be freed very soon, and existing readers are still
safe to read them.

For cls_route, we always init its tp->root, so it can't be NULL,
we can drop more useless code.

Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Цей коміт міститься в:
WANG Cong
2017-04-19 14:21:22 -07:00
зафіксовано David S. Miller
джерело 763dbf6328
коміт 4392053879
3 змінених файлів з 0 додано та 20 видалено

Переглянути файл

@@ -144,7 +144,6 @@ static void fw_destroy(struct tcf_proto *tp)
call_rcu(&f->rcu, fw_delete_filter);
}
}
RCU_INIT_POINTER(tp->root, NULL);
kfree_rcu(head, rcu);
}