diff mbox series

[net-next,v2,2/7] mptcp: use _fast lock version in __mptcp_move_skbs

Message ID 20201103190509.27416-3-mathew.j.martineau@linux.intel.com
State Accepted
Delegated to: David Miller
Headers show
Series mptcp: Miscellaneous MPTCP fixes | expand

Checks

Context Check Description
jkicinski/cover_letter success Link
jkicinski/fixes_present success Link
jkicinski/patch_count success Link
jkicinski/tree_selection success Clearly marked for net-next
jkicinski/subject_prefix success Link
jkicinski/source_inline success Was 0 now: 0
jkicinski/verify_signedoff success Link
jkicinski/module_param success Was 0 now: 0
jkicinski/build_32bit fail Errors and warnings before: 3 this patch: 4
jkicinski/kdoc success Errors and warnings before: 0 this patch: 0
jkicinski/verify_fixes success Link
jkicinski/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
jkicinski/build_allmodconfig_warn fail Errors and warnings before: 3 this patch: 4
jkicinski/header_inline success Link
jkicinski/stable success Stable not CCed

Commit Message

Mat Martineau Nov. 3, 2020, 7:05 p.m. UTC
From: Florian Westphal <fw@strlen.de>

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>
---
 net/mptcp/protocol.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

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) {