summaryrefslogtreecommitdiff
path: root/fs/ksmbd/smb2pdu.c
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2022-04-05 06:04:43 +0300
committerSteve French <stfrench@microsoft.com>2022-04-15 04:56:13 +0300
commit8510a043d334ecdf83d4604782f288db6bf21d60 (patch)
tree6657e6faccff11b94242c3edf8a92777c138ed14 /fs/ksmbd/smb2pdu.c
parent50f500b7f6335404b18bbffa93e3a905a08d061a (diff)
downloadlinux-8510a043d334ecdf83d4604782f288db6bf21d60.tar.xz
ksmbd: increment reference count of parent fp
Add missing increment reference count of parent fp in ksmbd_lookup_fd_inode(). Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/smb2pdu.c')
-rw-r--r--fs/ksmbd/smb2pdu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c
index e38fb68ded21..62cc0f95ab87 100644
--- a/fs/ksmbd/smb2pdu.c
+++ b/fs/ksmbd/smb2pdu.c
@@ -5758,8 +5758,10 @@ static int set_rename_info(struct ksmbd_work *work, struct ksmbd_file *fp,
if (parent_fp) {
if (parent_fp->daccess & FILE_DELETE_LE) {
pr_err("parent dir is opened with delete access\n");
+ ksmbd_fd_put(work, parent_fp);
return -ESHARE;
}
+ ksmbd_fd_put(work, parent_fp);
}
next:
return smb2_rename(work, fp, user_ns, rename_info,