summaryrefslogtreecommitdiffstats
path: root/net/mptcp/subflow.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2020-09-24 02:29:57 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-25 04:58:34 +0200
commit5c8c1640956e59797f838fb18495e3d3fb964205 (patch)
tree8279cc18cd89e3a121242ffa46aa9f0722b9772d /net/mptcp/subflow.c
parentmptcp: add RM_ADDR related mibs (diff)
downloadlinux-5c8c1640956e59797f838fb18495e3d3fb964205.tar.xz
linux-5c8c1640956e59797f838fb18495e3d3fb964205.zip
mptcp: add mptcp_destroy_common helper
This patch added a new helper named mptcp_destroy_common containing the shared code between mptcp_destroy() and mptcp_sock_destruct(). Suggested-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Geliang Tang <geliangtang@gmail.com> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/subflow.c')
-rw-r--r--net/mptcp/subflow.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index a1fefc965e17..ac2b19993f1a 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -435,9 +435,7 @@ static void mptcp_sock_destruct(struct sock *sk)
sock_orphan(sk);
}
- skb_rbtree_purge(&mptcp_sk(sk)->out_of_order_queue);
- mptcp_token_destroy(mptcp_sk(sk));
- mptcp_pm_free_anno_list(mptcp_sk(sk));
+ mptcp_destroy_common(mptcp_sk(sk));
inet_sock_destruct(sk);
}