summaryrefslogtreecommitdiff
path: root/net/sched/cls_fw.c
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2017-04-20 00:21:22 +0300
committerDavid S. Miller <davem@davemloft.net>2017-04-21 20:58:15 +0300
commit4392053879717edb0c4756a3878c0274267e237b (patch)
tree4b6135513c77437534060999f462638e4766beb3 /net/sched/cls_fw.c
parent763dbf6328e41de7a55851baf5ee49e367552531 (diff)
downloadlinux-4392053879717edb0c4756a3878c0274267e237b.tar.xz
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>
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r--net/sched/cls_fw.c1
1 files changed, 0 insertions, 1 deletions
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);
}