cifs: populate empty hostnames for extra channels
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 6 Jun 2022 09:52:46 +0000 (09:52 +0000)
committerSteve French <stfrench@microsoft.com>
Fri, 10 Jun 2022 23:55:02 +0000 (18:55 -0500)
commit4c14d7043fede258957d7b01da0cad2d9fe3a205
tree9dd0bce5348d8d287c1005c55d2131d04a66a556
parent8ea21823aa584b55ba4b861307093b78054b0c1b
cifs: populate empty hostnames for extra channels

Currently, the secondary channels of a multichannel session
also get hostname populated based on the info in primary channel.
However, this will end up with a wrong resolution of hostname to
IP address during reconnect.

This change fixes this by not populating hostname info for all
secondary channels.

Fixes: 5112d80c162f ("cifs: populate server_hostname for extra channels")
Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c
fs/cifs/sess.c