]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: reset iface weights when we cannot find a candidate
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 17 Jul 2025 12:06:13 +0000 (17:36 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:30 +0000 (16:28 +0200)
commit7e0c0664e9aacd1d9188dfc85fe3a482f34a17bb
treee69469502f652e798f0cdc77c4ff9b1a61db6f7b
parent1b6310d14b1311a5a9b43b30bba80e11dbfe786f
cifs: reset iface weights when we cannot find a candidate

commit 9d5eff7821f6d70f7d1b4d8a60680fba4de868a7 upstream.

We now do a weighted selection of server interfaces when allocating
new channels. The weights are decided based on the speed advertised.
The fulfilled weight for an interface is a counter that is used to
track the interface selection. It should be reset back to zero once
all interfaces fulfilling their weight.

In cifs_chan_update_iface, this reset logic was missing. As a result
when the server interface list changes, the client may not be able
to find a new candidate for other channels after all interfaces have
been fulfilled.

Fixes: a6d8fb54a515 ("cifs: distribute channels across interfaces based on speed")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/sess.c