Commit 109cdeb8 authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller

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: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb59bf28
...@@ -923,9 +923,8 @@ static void mptcp_check_for_eof(struct mptcp_sock *msk) ...@@ -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) static struct sock *mptcp_subflow_recv_lookup(const struct mptcp_sock *msk)
{ {
struct mptcp_subflow_context *subflow; 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) { mptcp_for_each_subflow(msk, subflow) {
if (READ_ONCE(subflow->data_avail)) if (READ_ONCE(subflow->data_avail))
...@@ -1408,7 +1407,7 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk) ...@@ -1408,7 +1407,7 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
u64 linger_time; u64 linger_time;
long tout = 0; long tout = 0;
sock_owned_by_me(sk); msk_owned_by_me(msk);
if (__mptcp_check_fallback(msk)) { if (__mptcp_check_fallback(msk)) {
if (!msk->first) if (!msk->first)
...@@ -1890,7 +1889,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied) ...@@ -1890,7 +1889,7 @@ static void mptcp_rcv_space_adjust(struct mptcp_sock *msk, int copied)
u32 time, advmss = 1; u32 time, advmss = 1;
u64 rtt_us, mstamp; u64 rtt_us, mstamp;
sock_owned_by_me(sk); msk_owned_by_me(msk);
if (copied <= 0) if (copied <= 0)
return; return;
...@@ -2217,7 +2216,7 @@ static struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk) ...@@ -2217,7 +2216,7 @@ static struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk)
struct mptcp_subflow_context *subflow; struct mptcp_subflow_context *subflow;
int min_stale_count = INT_MAX; int min_stale_count = INT_MAX;
sock_owned_by_me((const struct sock *)msk); msk_owned_by_me(msk);
if (__mptcp_check_fallback(msk)) if (__mptcp_check_fallback(msk))
return NULL; return NULL;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
static struct sock *__mptcp_tcp_fallback(struct mptcp_sock *msk) 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))) if (likely(!__mptcp_check_fallback(msk)))
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment