]> git.ipfire.org Git - thirdparty/linux.git/commit
cifs: on replayable errors back-off before replay, not after
authorShyam Prasad N <sprasad@microsoft.com>
Sat, 31 Jan 2026 08:33:03 +0000 (14:03 +0530)
committerSteve French <stfrench@microsoft.com>
Sun, 8 Feb 2026 23:07:43 +0000 (17:07 -0600)
commit16d480ed4990ed5aefb99c111dd14131a338e3c9
tree668a10c4f085040e1e9e374501325b4acf8cf961
parentebbbc4bfad4cb355d17c671223d0814ee3ef4eda
cifs: on replayable errors back-off before replay, not after

On replayable errors, we call smb2_should_replays that does these
things today:
1. decide if we need to replay the command again
2. sleep to back-off the failed request
3. update the next sleep value

We will not be able to use this for async requests, when this is
processed in callbacks (as this will be called in cifsd threads that
should not sleep in response processing).

Modify the behaviour by taking the sleep out of smb2_should_replay
and performing the sleep for back-off just before actually
performing the replay.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cached_dir.c
fs/smb/client/smb2inode.c
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c