From 4392053879717edb0c4756a3878c0274267e237b Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Wed, 19 Apr 2017 14:21:22 -0700 Subject: 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 Cc: John Fastabend Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- net/sched/cls_fw.c | 1 - 1 file changed, 1 deletion(-) (limited to 'net/sched/cls_fw.c') diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index 78ccb4a85a4d..d3885362e017 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c @@ -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); } -- cgit v1.2.3-59-g8ed1b