summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2018-09-16 07:04:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-22 09:32:44 +0300
commitef61a0bdb01ec8b3515fdb7fee4807d1feb950ad (patch)
tree01d3f473c1ee7d253f464c8d2a01f76e5e63db09 /fs/cifs
parent23bbddabb8a5620289a7120f10be2272f34c0afb (diff)
downloadlinux-ef61a0bdb01ec8b3515fdb7fee4807d1feb950ad.tar.xz
smb3: allow stats which track session and share reconnects to be reset
commit 2c887635cd6ab3af619dc2be94e5bf8f2e172b78 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_debug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 1b3a00a1eb8a..12ff7b8234da 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -271,6 +271,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;