Re: [PATCH net-next] mptcp: use mptcp_for_each_subflow in mptcp_stream_accept

From: Paolo Abeni
Date: Mon Aug 03 2020 - 12:43:01 EST


On Mon, 2020-08-03 at 21:00 +0800, Geliang Tang wrote:
> Use mptcp_for_each_subflow in mptcp_stream_accept instead of
> open-coding.
>
> Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
> ---
> net/mptcp/protocol.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index d3fe7296e1c9..400824eabf73 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2249,7 +2249,7 @@ static int mptcp_stream_accept(struct socket *sock, struct socket *newsock,
> * This is needed so NOSPACE flag can be set from tcp stack.
> */
> __mptcp_flush_join_list(msk);
> - list_for_each_entry(subflow, &msk->conn_list, node) {
> + mptcp_for_each_subflow(msk, subflow) {
> struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
>
> if (!ssk->sk_socket)

Acked-by: Paolo Abeni <pabeni@xxxxxxxxxx>