提交 9272f048 编写于 作者: W WANG Cong 提交者: David S. Miller

fou: avoid calling udp_del_offload() twice

This fixes the following harmless warning:

./ip/ip fou del port 7777
[  122.907516] udp_del_offload: didn't find offload for port 7777

Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d72da6aa
......@@ -410,6 +410,7 @@ static void fou_release(struct fou *fou)
struct socket *sock = fou->sock;
struct sock *sk = sock->sk;
if (sk->sk_family == AF_INET)
udp_del_offload(&fou->udp_offloads);
list_del(&fou->list);
......@@ -528,7 +529,6 @@ static int fou_destroy(struct net *net, struct fou_cfg *cfg)
spin_lock(&fou_lock);
list_for_each_entry(fou, &fou_list, list) {
if (fou->port == port) {
udp_del_offload(&fou->udp_offloads);
fou_release(fou);
err = 0;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册