]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: change iface_list from array to sorted linked list
authorShyam Prasad N <sprasad@microsoft.com>
Sat, 1 Jan 2022 12:50:21 +0000 (12:50 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Jun 2022 00:51:43 +0000 (19:51 -0500)
commit31374b92d94a26d8bf05d1e69091a3b6818492fc
tree102dd763484880c7a29ff85367b28be52ffcbf8f
parentce6e639c59edaaf9a8c56e2ecf03a3e744755b7d
cifs: change iface_list from array to sorted linked list

A server's published interface list can change over time, and needs
to be updated. We've storing iface_list as a simple array, which
makes it difficult to manipulate an existing list.

With this change, iface_list is modified into a linked list of
interfaces, which is kept sorted by speed.

Also added a reference counter for an iface entry, so that each
channel can maintain a backpointer to the iface and drop it
easily when needed.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifs_debug.c
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/misc.c
fs/cifs/sess.c
fs/cifs/smb2ops.c