Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb7814c3 authored by Steve French's avatar Steve French Committed by Greg Kroah-Hartman
Browse files

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: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b8e2aea1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;