lkml.org 
[lkml]   [2020]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net: gain ipv4 mtu when mtu is not locked
From
From: Miaohe Lin <linmiaohe@huawei.com>
Date: Mon, 24 Aug 2020 07:35:28 -0400

> When mtu is locked, we should not obtain ipv4 mtu as we return immediately
> in this case and leave acquired ipv4 mtu unused.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> net/ipv4/route.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 8ca6bcab7b03..f0a0faf58267 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -1013,13 +1013,14 @@ out: kfree_skb(skb);
> static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
> {
> struct dst_entry *dst = &rt->dst;
> - u32 old_mtu = ipv4_mtu(dst);
> + u32 old_mtu;
> struct fib_result res;
> bool lock = false;

Please preserve the reverse christmas tree ordering of local variables here.

\
 
 \ /
  Last update: 2020-08-24 15:41    [W:0.028 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site