From: Steve French Date: Sun, 16 Sep 2018 04:04:41 +0000 (-0500) Subject: smb3: allow stats which track session and share reconnects to be reset X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~6057^2~29 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=2c887635cd6ab3af619dc2be94e5bf8f2e172b78;p=linux.git smb3: allow stats which track session and share reconnects to be reset 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 Signed-off-by: Steve French Reviewed-by: Aurelien Aptel --- diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index f1fbea947fef..06576797cf31 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -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;