mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
cifs: if deferred close is disabled then close files immediately
[ Upstream commit df9d70c186
]
If defer close timeout value is set to 0, then there is no
need to include files in the deferred close list and utilize
the delayed worker for closing. Instead, we can close them
immediately.
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1873266c3e
commit
68a33f5825
1 changed files with 2 additions and 2 deletions
|
@ -880,8 +880,8 @@ int cifs_close(struct inode *inode, struct file *file)
|
|||
cfile = file->private_data;
|
||||
file->private_data = NULL;
|
||||
dclose = kmalloc(sizeof(struct cifs_deferred_close), GFP_KERNEL);
|
||||
if ((cinode->oplock == CIFS_CACHE_RHW_FLG) &&
|
||||
cinode->lease_granted &&
|
||||
if ((cifs_sb->ctx->closetimeo && cinode->oplock == CIFS_CACHE_RHW_FLG)
|
||||
&& cinode->lease_granted &&
|
||||
!test_bit(CIFS_INO_CLOSE_ON_LOCK, &cinode->flags) &&
|
||||
dclose) {
|
||||
if (test_and_clear_bit(CIFS_INO_MODIFIED_ATTR, &cinode->flags)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue