Patch "cifs: fix confusing unneeded warning message on smb2.1 and earlier" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cifs: fix confusing unneeded warning message on smb2.1 and earlier

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cifs-fix-confusing-unneeded-warning-message-on-smb2..patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d448d6efbea220fbff7b81afa09ba55e8dc7ec51
Author: Steve French <stfrench@xxxxxxxxxxxxx>
Date:   Wed Feb 16 13:23:53 2022 -0600

    cifs: fix confusing unneeded warning message on smb2.1 and earlier
    
    [ Upstream commit 53923e0fe2098f90f339510aeaa0e1413ae99a16 ]
    
    When mounting with SMB2.1 or earlier, even with nomultichannel, we
    log the confusing warning message:
      "CIFS: VFS: multichannel is not supported on this protocol version, use 3.0 or above"
    
    Fix this so that we don't log this unless they really are trying
    to mount with multichannel.
    
    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215608
    Reported-by: Kim Scarborough <kim@xxxxxxxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx # 5.11+
    Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
    Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index a1e688113645f..5500ea7837845 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -76,11 +76,6 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
 	struct cifs_server_iface *ifaces = NULL;
 	size_t iface_count;
 
-	if (ses->server->dialect < SMB30_PROT_ID) {
-		cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n");
-		return 0;
-	}
-
 	spin_lock(&ses->chan_lock);
 
 	new_chan_count = old_chan_count = ses->chan_count;
@@ -94,6 +89,12 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
 		return 0;
 	}
 
+	if (ses->server->dialect < SMB30_PROT_ID) {
+		spin_unlock(&ses->chan_lock);
+		cifs_dbg(VFS, "multichannel is not supported on this protocol version, use 3.0 or above\n");
+		return 0;
+	}
+
 	if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
 		cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
 		ses->chan_max = 1;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux