From: nspmangalore@gmail.com
To: linux-cifs@vger.kernel.org, smfrench@gmail.com, pc@manguebit.com,
bharathsm@microsoft.com, dhowells@redhat.com
Cc: Shyam Prasad N <sprasad@microsoft.com>
Subject: [PATCH 3/4] cifs: Initialize cur_sleep value if not already done
Date: Tue, 20 Jan 2026 11:51:36 +0530 [thread overview]
Message-ID: <20260120062152.628822-3-sprasad@microsoft.com> (raw)
In-Reply-To: <20260120062152.628822-1-sprasad@microsoft.com>
From: Shyam Prasad N <sprasad@microsoft.com>
A value of 0 for cur_sleep is not a valid one. By checking for
a zero value and explicitly setting it to 1, we avoid the added
dependency on the callers.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
---
fs/smb/client/smb2ops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index a16ded46b5a26..a7e06d175f899 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -2774,6 +2774,8 @@ bool smb2_should_replay(struct cifs_tcon *tcon,
return false;
if (tcon->retry || (*pretries)++ < tcon->ses->server->retrans) {
+ if (!(*pcur_sleep))
+ (*pcur_sleep) = 1;
msleep(*pcur_sleep);
(*pcur_sleep) = ((*pcur_sleep) << 1);
if ((*pcur_sleep) > CIFS_MAX_SLEEP)
--
2.43.0
next prev parent reply other threads:[~2026-01-20 6:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 6:21 [PATCH 1/4] netfs: when subreq is marked for retry, do not check if it faced an error nspmangalore
2026-01-20 6:21 ` [PATCH 2/4] netfs: avoid double increment of retry_count in subreq nspmangalore
2026-01-21 23:23 ` David Howells
2026-01-20 6:21 ` nspmangalore [this message]
2026-01-21 23:28 ` [PATCH 3/4] cifs: Initialize cur_sleep value if not already done David Howells
2026-01-20 6:21 ` [PATCH 4/4] cifs: make retry logic in read/write path consistent with other paths nspmangalore
2026-01-20 11:32 ` kernel test robot
2026-01-20 17:03 ` David Howells
2026-01-21 4:45 ` Shyam Prasad N
2026-01-21 1:56 ` Steve French
2026-01-21 4:46 ` Shyam Prasad N
2026-01-21 23:36 ` David Howells
2026-01-21 23:50 ` David Howells
2026-01-29 11:38 ` Shyam Prasad N
2026-01-21 23:08 ` [PATCH 1/4] netfs: when subreq is marked for retry, do not check if it faced an error David Howells
2026-01-21 23:18 ` David Howells
2026-01-29 12:13 ` Shyam Prasad N
2026-01-29 13:43 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260120062152.628822-3-sprasad@microsoft.com \
--to=nspmangalore@gmail.com \
--cc=bharathsm@microsoft.com \
--cc=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=pc@manguebit.com \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox