From: Stefan Metzmacher Date: Thu, 14 Aug 2025 16:34:02 +0000 (+0200) Subject: smb: client: remove useless smbd_connection.send_immediate X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3e743b514c20bfe26e340835cebb1f8301997ab;p=thirdparty%2Fkernel%2Fstable.git smb: client: remove useless smbd_connection.send_immediate We always set it to true before having an if statement that checks it is true... Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Acked-by: Namjae Jeon Signed-off-by: Stefan Metzmacher Signed-off-by: Steve French --- diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 512f1cdd3e91b..21e4a10d39991 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -563,14 +563,10 @@ static void smbd_post_send_credits(struct work_struct *work) } /* Promptly send an immediate packet as defined in [MS-SMBD] 3.1.1.1 */ - info->send_immediate = true; if (atomic_read(&sc->recv_io.credits.count) < sc->recv_io.credits.target - 1) { - if (info->keep_alive_requested == KEEP_ALIVE_PENDING || - info->send_immediate) { - log_keep_alive(INFO, "send an empty message\n"); - smbd_post_send_empty(info); - } + log_keep_alive(INFO, "send an empty message\n"); + smbd_post_send_empty(info); } } @@ -1124,8 +1120,6 @@ wait_send_queue: atomic_add(new_credits, &sc->recv_io.credits.count); packet->credits_granted = cpu_to_le16(new_credits); - info->send_immediate = false; - packet->flags = 0; if (manage_keep_alive_before_sending(info)) packet->flags |= cpu_to_le16(SMBDIRECT_FLAG_RESPONSE_REQUESTED); diff --git a/fs/smb/client/smbdirect.h b/fs/smb/client/smbdirect.h index fb681605ea375..2666f39ef26bd 100644 --- a/fs/smb/client/smbdirect.h +++ b/fs/smb/client/smbdirect.h @@ -74,8 +74,6 @@ struct smbd_connection { /* Used by transport to wait until all MRs are returned */ wait_queue_head_t wait_for_mr_cleanup; - bool send_immediate; - struct workqueue_struct *workqueue; struct delayed_work idle_timer_work;