cifs: empty interface list when server doesn't support query interfaces
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 9 Mar 2023 13:23:29 +0000 (13:23 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Mar 2023 16:19:42 +0000 (11:19 -0500)
When querying server interfaces returns -EOPNOTSUPP,
clear the list of interfaces. Assumption is that multichannel
would be disabled too.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c

index 96ca09d..f7e18ab 100644 (file)
@@ -717,7 +717,7 @@ SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon, bool in_
        if (rc == -EOPNOTSUPP) {
                cifs_dbg(FYI,
                         "server does not support query network interfaces\n");
-               goto out;
+               ret_data_len = 0;
        } else if (rc != 0) {
                cifs_tcon_dbg(VFS, "error %d on ioctl to get interface list\n", rc);
                goto out;