mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 22:24:11 +08:00
net: bridge: remove redundant check of f->dst
In br_fill_forward_path(), f->dst is checked not to be NULL, then immediately read using READ_ONCE and checked again. The first check is useless, so this patch aims to remove the redundant check of f->dst. Signed-off-by: linke li <lilinke99@qq.com> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e44894e2aa
commit
e7d96e750f
@ -389,7 +389,7 @@ static int br_fill_forward_path(struct net_device_path_ctx *ctx,
|
||||
br_vlan_fill_forward_path_pvid(br, ctx, path);
|
||||
|
||||
f = br_fdb_find_rcu(br, ctx->daddr, path->bridge.vlan_id);
|
||||
if (!f || !f->dst)
|
||||
if (!f)
|
||||
return -1;
|
||||
|
||||
dst = READ_ONCE(f->dst);
|
||||
|
Loading…
Reference in New Issue
Block a user