[PATCH v3 net-next 4/9] rds: use sk_set_nospace()
Allison Henderson
achender at kernel.org
Tue Sep 29 18:59:50 PDT 2026
On Tue, 2026-09-29 at 07:17 +0000, Eric Dumazet wrote:
> Use the new helpers instead of open coding the SOCK_NOSPACE
> manipulation, so that TCP can later maintain a cheaper private
> copy of this bit.
>
> No functional change intended.
>
> Reviewed-by: Kuniyuki Iwashima <kuniyu at google.com>
> Signed-off-by: Eric Dumazet <edumazet at kernel.org>
Thank you!
Acked-by: Allison Henderson <achender at kernel.org>
> ---
> net/rds/tcp_send.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c
> index 7c52acc749cf4d4003c749a2646c2b4f87f207fe..824222c475119d91e333123c5afc9291005a8696 100644
> --- a/net/rds/tcp_send.c
> +++ b/net/rds/tcp_send.c
> @@ -100,7 +100,7 @@ int rds_tcp_xmit(struct rds_connection *conn, struct rds_message *rm,
>
> if (hdr_off < sizeof(struct rds_header)) {
> /* see rds_tcp_write_space() */
> - set_bit(SOCK_NOSPACE, &tc->t_sock->sk->sk_socket->flags);
> + sk_set_nospace(tc->t_sock->sk);
>
> ret = rds_tcp_sendmsg(tc->t_sock,
> (void *)&rm->m_inc.i_hdr + hdr_off,
> @@ -221,6 +221,5 @@ void rds_tcp_write_space(struct sock *sk)
> */
> write_space(sk);
>
> - if (sk->sk_socket)
> - set_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
> + sk_set_nospace(sk);
> }
More information about the Linux-nvme
mailing list