nvme-tcp: use sk_clear_nospace()

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@google.com>
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Link: https://patch.msgid.link/20260929071743.23624-8-edumazet@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2026-09-29 07:17:41 +00:00 committed by Jakub Kicinski
parent 24280d1d28
commit f80fa2ddfe
2 changed files with 2 additions and 2 deletions

View File

@ -1133,7 +1133,7 @@ static void nvme_tcp_write_space(struct sock *sk)
read_lock_bh(&sk->sk_callback_lock);
queue = sk->sk_user_data;
if (likely(queue && sk_stream_is_writeable(sk))) {
clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
sk_clear_nospace(sk);
/* Ensure pending TLS partial records are retried */
if (nvme_tcp_queue_tls(queue))
queue->write_space(sk);

View File

@ -1686,7 +1686,7 @@ static void nvmet_tcp_write_space(struct sock *sk)
}
if (sk_stream_is_writeable(sk)) {
clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags);
sk_clear_nospace(sk);
queue_work_on(queue_cpu(queue), nvmet_tcp_wq, &queue->io_work);
}
out: