mptcp: use msk_owned_by_me helper

The helper msk_owned_by_me() is defined in protocol.h, so use it instead
of sock_owned_by_me().

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Geliang Tang 2023-01-06 10:57:17 -08:00 committed by David S. Miller
parent fb59bf28cd
commit 109cdeb8df
2 changed files with 5 additions and 6 deletions

View File

@ -923,9 +923,8 @@ static void mptcp_check_for_eof(struct mptcp_sock *msk)
static struct sock *mptcp_subflow_recv_lookup(const struct mptcp_sock *msk)
{
struct mptcp_subflow_context *subflow;
struct sock *sk = (struct sock *)msk;
sock_owned_by_me(sk);
msk_owned_by_me(msk);
mptcp_for_each_subflow(msk, subflow) {
if (READ_ONCE(subflow->data_avail))
@ -1408,7 +1407,7 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
u64 linger_time;
long tout = 0;
sock_owned_by_me(sk);
msk_owned_by_me(msk);
if (__mptcp_check_fallback(msk)) {
if (!msk->first)
@ -1890,7 +1889,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
u32 time, advmss = 1;
u64 rtt_us, mstamp;
sock_owned_by_me(sk);
msk_owned_by_me(msk);
if (copied <= 0)
return;
@ -2217,7 +2216,7 @@ static struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk)
struct mptcp_subflow_context *subflow;
int min_stale_count = INT_MAX;
sock_owned_by_me((const struct sock *)msk);
msk_owned_by_me(msk);
if (__mptcp_check_fallback(msk))
return NULL;

View File

@ -18,7 +18,7 @@
static struct sock *__mptcp_tcp_fallback(struct mptcp_sock *msk)
{
sock_owned_by_me((const struct sock *)msk);
msk_owned_by_me(msk);
if (likely(!__mptcp_check_fallback(msk)))
return NULL;