diff options
author | Florian Westphal <fw@strlen.de> | 2022-02-16 03:11:30 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 05:52:06 +0100 |
commit | 952382c648e5929b961137840e1c5f65cf0cbef1 (patch) | |
tree | 1339f599a7c681c0fdcb4f44132b1643af7f577c /net/mptcp/subflow.c | |
parent | mptcp: mark ops structures as ro_after_init (diff) | |
download | linux-952382c648e5929b961137840e1c5f65cf0cbef1.tar.xz linux-952382c648e5929b961137840e1c5f65cf0cbef1.zip |
mptcp: don't save tcp data_ready and write space callbacks
Assign the helpers directly rather than save/restore in the context
structure.
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 '')
-rw-r--r-- | net/mptcp/subflow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 740cb4763461..45c004f87f5a 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1654,10 +1654,12 @@ static int subflow_ulp_init(struct sock *sk) tp->is_mptcp = 1; ctx->icsk_af_ops = icsk->icsk_af_ops; icsk->icsk_af_ops = subflow_default_af_ops(sk); - ctx->tcp_data_ready = sk->sk_data_ready; ctx->tcp_state_change = sk->sk_state_change; - ctx->tcp_write_space = sk->sk_write_space; ctx->tcp_error_report = sk->sk_error_report; + + WARN_ON_ONCE(sk->sk_data_ready != sock_def_readable); + WARN_ON_ONCE(sk->sk_write_space != sk_stream_write_space); + sk->sk_data_ready = subflow_data_ready; sk->sk_write_space = subflow_write_space; sk->sk_state_change = subflow_state_change; @@ -1712,9 +1714,7 @@ static void subflow_ulp_clone(const struct request_sock *req, new_ctx->conn_finished = 1; new_ctx->icsk_af_ops = old_ctx->icsk_af_ops; - new_ctx->tcp_data_ready = old_ctx->tcp_data_ready; new_ctx->tcp_state_change = old_ctx->tcp_state_change; - new_ctx->tcp_write_space = old_ctx->tcp_write_space; new_ctx->tcp_error_report = old_ctx->tcp_error_report; new_ctx->rel_write_seq = 1; new_ctx->tcp_sock = newsk; |