cifs: do not let cifs_chan_update_iface deallocate channels
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 15 Dec 2023 17:16:56 +0000 (17:16 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 19 Dec 2023 17:04:04 +0000 (11:04 -0600)
commit12d1e301bdfd1f2e2f371432dedef7cce8f01c4a
tree5962b82a1c948c6d3d05cb175b799586759cd24b
parentf30bbc38704e279c06d073ecb18fea376791ecab
cifs: do not let cifs_chan_update_iface deallocate channels

cifs_chan_update_iface is meant to check and update the server
interface used for a channel when the existing server interface
is no longer available.

So far, this handler had the code to remove an interface entry
even if a new candidate interface is not available. Allowing
this leads to several corner cases to handle.

This change makes the logic much simpler by not deallocating
the current channel interface entry if a new interface is not
found to replace it with.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/sess.c