On 3/19/19 7:21 PM, Xin Long wrote:
> I will post v2 by moving down 'fallback:':
> 
> { ...
>         if (!fib6_info_hold_safe(rt))
>                 goto fallback;
> 
>         nrt = ip6_dst_alloc(dev_net(dev), dev, flags);
>         if (!nrt) {
>                 fib6_info_release(rt);
>                 goto fallback;
>         }
> 
>         ip6_rt_copy_init(nrt, rt);
>         return nrt;
> 
> fallback:
>         nrt = dev_net(dev)->ipv6.ip6_null_entry;
>         dst_hold(&nrt->dst);
>         return nrt;
> }

I think that is the more typical pattern. Thanks,

Reply via email to