]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerSteve French <stfrench@microsoft.com>
Sun, 27 Jul 2025 21:59:58 +0000 (16:59 -0500)
commit9d5eff7821f6d70f7d1b4d8a60680fba4de868a7
tree6f289283c737d4ae6e1f3db54d38ba40d3efdaa3
parent59b33fab4ca4d7dacc03367082777627e05d0323
cifs: reset iface weights when we cannot find a candidate

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>
fs/smb/client/sess.c