cifs: update iface_last_update on each query-and-update
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 3 Jan 2024 12:51:49 +0000 (12:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:49 +0000 (16:18 -0800)
commitcc29591dacdf5f63ada39d1449d52d52890fcdde
treedb8f51a418d926de938109301749863488ac87c5
parent50e8363ecc85da49764781da90ebffe1a657b370
cifs: update iface_last_update on each query-and-update

[ Upstream commit 78e727e58e54efca4c23863fbd9e16e9d2d83f81 ]

iface_last_update was an unused field when it was introduced.
Later, when we had periodic update of server interface list,
this field was used regularly to decide when to update next.

However, with the new logic of updating the interfaces, it
becomes crucial that this field be updated whenever
parse_server_interfaces runs successfully.

This change updates this field when either the server does
not support query of interfaces; so that we do not query
the interfaces repeatedly. It also updates the field when
the function reaches the end.

Fixes: aa45dadd34e4 ("cifs: change iface_list from array to sorted linked list")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/smb2ops.c