smb3: fix performance regression with setting mtime
authorSteve French <stfrench@microsoft.com>
Mon, 24 Feb 2020 23:37:39 +0000 (17:37 -0600)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Mar 2020 03:49:09 +0000 (22:49 -0500)
commitcf5371ae460eb8e484e4884747af270c86c3c469
tree860c53e633ea4881d5cb1f2603b23f84a76aa421
parent864138cb31181871c307b5455fd570c7dae001b9
smb3: fix performance regression with setting mtime

There are cases when we don't want to send the SMB2 flush operation
(e.g. when user specifies mount parm "nostrictsync") and it can be
a very expensive operation on the server.  In most cases in order
to set mtime, we simply need to flush (write) the dirtry pages from
the client and send the writes to the server not also send a flush
protocol operation to the server.

Fixes: aa081859b10c ("cifs: flush before set-info if we have writeable handles")
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/inode.c