]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: query attributes on file close
authorSteve French <stfrench@microsoft.com>
Tue, 3 Dec 2019 03:46:54 +0000 (21:46 -0600)
committerSteve French <stfrench@microsoft.com>
Tue, 3 Dec 2019 21:48:02 +0000 (15:48 -0600)
commit4637b6e3f2ed5754c51a79acc1cf4e12a586873d
tree0eabdc6fb77016e544ea32569722114e67b8a6b9
parente7c660a16bb24c982562a965be5abd997270bedf
smb3: query attributes on file close

Since timestamps on files on most servers can be updated at
close, and since timestamps on our dentries default to one
second we can have stale timestamps in some common cases
(e.g. open, write, close, stat, wait one second, stat - will
show different mtime for the first and second stat).

The SMB2/SMB3 protocol allows querying timestamps at close
so add the code to request timestamp and attr information
(which is cheap for the server to provide) to be returned
when a file is closed (it is not needed for the many
paths that call SMB2_close that are from compounded
query infos and close nor is it needed for some of
the cases where a directory close immediately follows a
directory open.

Signed-off-by: Steve French <stfrench@microsoft.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/file.c
fs/cifs/smb2inode.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2pdu.h
fs/cifs/smb2proto.h