Skip to content

Commit

Permalink
mptcp: use _fast lock version in __mptcp_move_skbs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Westphal authored and jenkins-tessares committed Sep 9, 2020
1 parent ef14371 commit 691048c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,13 +1471,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) {
Expand Down

0 comments on commit 691048c

Please sign in to comment.