mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
ipv4: fib: Use cached net in fib_inetaddr_event().
net is available in fib_inetaddr_event(), let's use it. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://patch.msgid.link/20250228042328.96624-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
d110dbf149
commit
e5bf1c39e8
|
|
@ -1450,7 +1450,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
|
|||
fib_sync_up(dev, RTNH_F_DEAD);
|
||||
#endif
|
||||
atomic_inc(&net->ipv4.dev_addr_genid);
|
||||
rt_cache_flush(dev_net(dev));
|
||||
rt_cache_flush(net);
|
||||
break;
|
||||
case NETDEV_DOWN:
|
||||
fib_del_ifaddr(ifa, NULL);
|
||||
|
|
@ -1461,7 +1461,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
|
|||
*/
|
||||
fib_disable_ip(dev, event, true);
|
||||
} else {
|
||||
rt_cache_flush(dev_net(dev));
|
||||
rt_cache_flush(net);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user