]> 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>
Wed, 20 Aug 2025 16:36:28 +0000 (18:36 +0200)
commit1fdecdc0c6d6edba5d832723be8f2a601d109531
treed740f4f6ac32b4f894d52061e86af8e0ebd9e954
parent187386f3463864adbbdf1e2adc7b6e381111e71b
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