]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cifs: fix missing display of three mount options
authorSteve French <stfrench@microsoft.com>
Sun, 11 Dec 2022 19:54:21 +0000 (13:54 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:49 +0000 (11:41 +0100)
commit db4045c25695d728d5fa7aca63c3e9a45da1bdb5 upstream.

Three mount options: "tcpnodelay" and "noautotune" and "noblocksend"
were not displayed when passed in on cifs/smb3 mounts (e.g. displayed
in /proc/mounts e.g.).  No change to defaults so these are not
displayed if not specified on mount.

Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsfs.c

index 79a18692b84c5530132210fe16d2217ff29fb4a1..aa7827da7b178e315cefb201e92d1f79e064bc49 100644 (file)
@@ -609,9 +609,15 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
        seq_printf(s, ",echo_interval=%lu",
                        tcon->ses->server->echo_interval / HZ);
 
-       /* Only display max_credits if it was overridden on mount */
+       /* Only display the following if overridden on mount */
        if (tcon->ses->server->max_credits != SMB2_MAX_CREDITS_AVAILABLE)
                seq_printf(s, ",max_credits=%u", tcon->ses->server->max_credits);
+       if (tcon->ses->server->tcp_nodelay)
+               seq_puts(s, ",tcpnodelay");
+       if (tcon->ses->server->noautotune)
+               seq_puts(s, ",noautotune");
+       if (tcon->ses->server->noblocksnd)
+               seq_puts(s, ",noblocksend");
 
        if (tcon->snapshot_time)
                seq_printf(s, ",snapshot=%llu", tcon->snapshot_time);