Commit 8b4510d7 authored by Miaohe Lin's avatar Miaohe Lin Committed by David S. Miller

net: gain ipv4 mtu when mtu is not locked

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: default avatarMiaohe Lin <linmiaohe@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 079f921e
...@@ -1013,13 +1013,14 @@ out: kfree_skb(skb); ...@@ -1013,13 +1013,14 @@ out: kfree_skb(skb);
static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu) static void __ip_rt_update_pmtu(struct rtable *rt, struct flowi4 *fl4, u32 mtu)
{ {
struct dst_entry *dst = &rt->dst; struct dst_entry *dst = &rt->dst;
u32 old_mtu = ipv4_mtu(dst);
struct fib_result res; struct fib_result res;
bool lock = false; bool lock = false;
u32 old_mtu;
if (ip_mtu_locked(dst)) if (ip_mtu_locked(dst))
return; return;
old_mtu = ipv4_mtu(dst);
if (old_mtu < mtu) if (old_mtu < mtu)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment