summaryrefslogtreecommitdiff
path: root/fs/cifsd/smb2pdu.c
diff options
context:
space:
mode:
authorHyunchul Lee <hyc.lee@gmail.com>2021-04-13 13:24:43 +0900
committerSteve French <stfrench@microsoft.com>2021-05-10 19:15:41 -0500
commit24b626967d9574a477acf2ab94f55c847d04939a (patch)
treeeab673c3974b22041960fbc68dd354878fb7e222 /fs/cifsd/smb2pdu.c
parent3c20378325c710e7257b22ba333310771be51192 (diff)
cifsd: fix reference count decrement of unclaimed file in __ksmbd_lookup_fd
__ksmbd_lookup_fd could decrement the reference count of unclaimed ksmbd_file to 0 but not release this ksmbd_file. ksmbd_file cannot be unclaimed except ksmbd_close_inode_fds(), because ksmbd_file is only removed from the m_fp_list list after the reference count of ksmbd_file becomes 0. And if the count is 0, __ksmbd_lookup_fd does not use ksmbd_file found from idr due to atomic_inc_not_zero. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifsd/smb2pdu.c')
-rw-r--r--fs/cifsd/smb2pdu.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c
index 3fbd8e4925bb..08b06ec97e22 100644
--- a/fs/cifsd/smb2pdu.c
+++ b/fs/cifsd/smb2pdu.c
@@ -2779,11 +2779,6 @@ int smb2_open(struct ksmbd_work *work)
goto err_out;
}
- if (server_conf.flags & KSMBD_GLOBAL_FLAG_DURABLE_HANDLE &&
- file_present)
- file_present = ksmbd_close_inode_fds(work,
- d_inode(path.dentry));
-
daccess = smb_map_generic_desired_access(req->DesiredAccess);
if (file_present && !(req->CreateOptions & FILE_DELETE_ON_CLOSE_LE)) {