]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: fix reset of bytes read and written stats
authorSteve French <stfrench@microsoft.com>
Wed, 1 Aug 2018 05:56:12 +0000 (00:56 -0500)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Aug 2018 19:20:22 +0000 (14:20 -0500)
commitb3b570346bbe7ee1f3f7b9706e9664e5cac699a2
tree2aab783b6b474782fcf76caef87e46fb068d785a
parentda241ecf0b0fa36e6e56135dd17a131032584c60
smb3: fix reset of bytes read and written stats

echo 0 > /proc/fs/cifs/Stats is supposed to reset the stats
but there were four (see example below) that were not reset
(bytes read and witten, total vfs ops and max ops
at one time).

...
0 session 0 share reconnects
Total vfs operations: 100 maximum at one time: 2

1) \\localhost\test
SMBs: 0
Bytes read: 502092  Bytes written: 31457286
TreeConnects: 0 total 0 failed
TreeDisconnects: 0 total 0 failed
...

This patch fixes cifs_stats_proc_write to properly reset
those four.

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