diff options
author | Florian Westphal <fw@strlen.de> | 2020-11-03 11:05:04 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-04 17:45:52 -0800 |
commit | 65f49fe72f9e4063b96c78de62f3ff9a3384164e (patch) | |
tree | 4bed763ce503ed79ee4d451945e627b65407c67f /net/mptcp | |
parent | 13c7ba0c8494a4fcee9e8cc163ae332d0480bde5 (diff) |
mptcp: use _fast lock version in __mptcp_move_skbs
The function is short and won't sleep, so this can use the _fast version.
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp')
-rw-r--r-- | net/mptcp/protocol.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e010ef7585bf..f5bacfc55006 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1493,13 +1493,14 @@ static bool __mptcp_move_skbs(struct mptcp_sock *msk) __mptcp_flush_join_list(msk); do { struct sock *ssk = mptcp_subflow_recv_lookup(msk); + bool slowpath; if (!ssk) break; - lock_sock(ssk); + slowpath = lock_sock_fast(ssk); done = __mptcp_move_skbs_from_subflow(msk, ssk, &moved); - release_sock(ssk); + unlock_sock_fast(ssk, slowpath); } while (!done); if (mptcp_ofo_queue(msk) || moved > 0) { |