smb3: allow stats which track session and share reconnects to be reset
authorSteve French <stfrench@microsoft.com>
Sun, 16 Sep 2018 04:04:41 +0000 (23:04 -0500)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Oct 2018 02:16:04 +0000 (21:16 -0500)
Currently, "echo 0 > /proc/fs/cifs/Stats" resets all of the stats
except the session and share reconnect counts.  Fix it to
reset those as well.

CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
fs/cifs/cifs_debug.c

index f1fbea9..0657679 100644 (file)
@@ -383,6 +383,9 @@ static ssize_t cifs_stats_proc_write(struct file *file,
                atomic_set(&totBufAllocCount, 0);
                atomic_set(&totSmBufAllocCount, 0);
 #endif /* CONFIG_CIFS_STATS2 */
+               atomic_set(&tcpSesReconnectCount, 0);
+               atomic_set(&tconInfoReconnectCount, 0);
+
                spin_lock(&GlobalMid_Lock);
                GlobalMaxActiveXid = 0;
                GlobalCurrentXid = 0;