]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Deferred close for files
authorRohith Surabattula <rohiths@microsoft.com>
Tue, 13 Apr 2021 05:26:42 +0000 (00:26 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 3 May 2021 16:20:35 +0000 (11:20 -0500)
commitbd706fe41715eff8f361a7514dede538ffcff120
treeecfa1fdb80e4aa3281c34008d6962d61eb471573
parent825dad9f7076f8129d3bea242dd9516926d5c98c
cifs: Deferred close for files

When file is closed, SMB2 close request is not sent to server
immediately and is deferred for acregmax defined interval. When file is
reopened by same process for read or write, the file handle
is reused if an oplock is held.

When client receives a oplock/lease break, file is closed immediately
if reference count is zero, else oplock is downgraded.

Signed-off-by: Rohith Surabattula <rohiths@microsoft.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/file.c
fs/cifs/inode.c
fs/cifs/misc.c