summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2025-08-14 18:34:02 +0200
committerSteve French <stfrench@microsoft.com>2025-09-28 18:29:49 -0500
commitd3e743b514c20bfe26e340835cebb1f8301997ab (patch)
treebe20a2ac99d3de93fabcd5911a61b530b2b7a99a
parentc7316ec2d542e27ea717a0d7493902098329f908 (diff)
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 <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/client/smbdirect.c10
-rw-r--r--fs/smb/client/smbdirect.h2
2 files changed, 2 insertions, 10 deletions
diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
index 512f1cdd3e91..21e4a10d3999 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 fb681605ea37..2666f39ef26b 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;