]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: remove useless smbd_connection.send_immediate
authorStefan Metzmacher <metze@samba.org>
Thu, 14 Aug 2025 16:34:02 +0000 (18:34 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:49 +0000 (18:29 -0500)
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>
fs/smb/client/smbdirect.c
fs/smb/client/smbdirect.h

index 512f1cdd3e91b62166335518bd54d6bfc4e7d835..21e4a10d39991c0ccd5c2d07a58d196acc0d987b 100644 (file)
@@ -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);
index fb681605ea375a7685b87e43546825ae9db31417..2666f39ef26bdb03c767090bd43285a0ad52b946 100644 (file)
@@ -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;