All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv6: delay fib6_sernum increase in fib6_add
@ 2021-09-09  8:39 zhang kai
  2021-09-12 17:11 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: zhang kai @ 2021-09-09  8:39 UTC (permalink / raw)
  To: davem; +Cc: yoshfuji, dsahern, kuba, netdev, linux-kernel, zhang kai

only increase fib6_sernum in net namespace after add fib6_info
successfully.

Signed-off-by: zhang kai <zhangkaiheb@126.com>
---
 net/ipv6/ip6_fib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 4d7b93baa..07de2fbc9 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1377,7 +1377,6 @@ int fib6_add(struct fib6_node *root, struct fib6_info *rt,
 	int err = -ENOMEM;
 	int allow_create = 1;
 	int replace_required = 0;
-	int sernum = fib6_new_sernum(info->nl_net);
 
 	if (info->nlh) {
 		if (!(info->nlh->nlmsg_flags & NLM_F_CREATE))
@@ -1477,7 +1476,7 @@ int fib6_add(struct fib6_node *root, struct fib6_info *rt,
 	if (!err) {
 		if (rt->nh)
 			list_add(&rt->nh_list, &rt->nh->f6i_list);
-		__fib6_update_sernum_upto_root(rt, sernum);
+		__fib6_update_sernum_upto_root(rt, fib6_new_sernum(info->nl_net));
 		fib6_start_gc(info->nl_net, rt);
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ipv6: delay fib6_sernum increase in fib6_add
  2021-09-09  8:39 [PATCH] ipv6: delay fib6_sernum increase in fib6_add zhang kai
@ 2021-09-12 17:11 ` David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2021-09-12 17:11 UTC (permalink / raw)
  To: zhang kai, davem; +Cc: yoshfuji, dsahern, kuba, netdev, linux-kernel

On 9/9/21 2:39 AM, zhang kai wrote:
> only increase fib6_sernum in net namespace after add fib6_info
> successfully.
> 
> Signed-off-by: zhang kai <zhangkaiheb@126.com>
> ---
>  net/ipv6/ip6_fib.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-12 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  8:39 [PATCH] ipv6: delay fib6_sernum increase in fib6_add zhang kai
2021-09-12 17:11 ` David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.