]> git.ipfire.org Git - people/ms/linux.git/commit - fs/cifs/misc.c
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)
commitc3f207ab29f793b8c942ce8067ed123f18d5b81b
treeecfa1fdb80e4aa3281c34008d6962d61eb471573
parentfee742b502894c8ed02506fff61d7605934f93cb
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