Skip to content

Commit d3e743b

Browse files
metze-sambasmfrench
authored andcommitted
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>
1 parent c7316ec commit d3e743b

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

fs/smb/client/smbdirect.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -563,14 +563,10 @@ static void smbd_post_send_credits(struct work_struct *work)
563563
}
564564

565565
/* Promptly send an immediate packet as defined in [MS-SMBD] 3.1.1.1 */
566-
info->send_immediate = true;
567566
if (atomic_read(&sc->recv_io.credits.count) <
568567
sc->recv_io.credits.target - 1) {
569-
if (info->keep_alive_requested == KEEP_ALIVE_PENDING ||
570-
info->send_immediate) {
571-
log_keep_alive(INFO, "send an empty message\n");
572-
smbd_post_send_empty(info);
573-
}
568+
log_keep_alive(INFO, "send an empty message\n");
569+
smbd_post_send_empty(info);
574570
}
575571
}
576572

@@ -1124,8 +1120,6 @@ static int smbd_post_send_iter(struct smbd_connection *info,
11241120
atomic_add(new_credits, &sc->recv_io.credits.count);
11251121
packet->credits_granted = cpu_to_le16(new_credits);
11261122

1127-
info->send_immediate = false;
1128-
11291123
packet->flags = 0;
11301124
if (manage_keep_alive_before_sending(info))
11311125
packet->flags |= cpu_to_le16(SMBDIRECT_FLAG_RESPONSE_REQUESTED);

fs/smb/client/smbdirect.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ struct smbd_connection {
7474
/* Used by transport to wait until all MRs are returned */
7575
wait_queue_head_t wait_for_mr_cleanup;
7676

77-
bool send_immediate;
78-
7977
struct workqueue_struct *workqueue;
8078
struct delayed_work idle_timer_work;
8179

0 commit comments

Comments
 (0)