diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2022-02-24 03:03:41 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-04-15 03:56:13 +0200 |
commit | 50f500b7f6335404b18bbffa93e3a905a08d061a (patch) | |
tree | 2b0c2fb9d19cd467acd02ade9bb8ab58e2cd8983 /fs/ksmbd/oplock.c | |
parent | Linux 5.18-rc2 (diff) | |
download | linux-50f500b7f6335404b18bbffa93e3a905a08d061a.tar.xz linux-50f500b7f6335404b18bbffa93e3a905a08d061a.zip |
ksmbd: remove filename in ksmbd_file
If the filename is change by underlying rename the server, fp->filename
and real filename can be different. This patch remove the uses of
fp->filename in ksmbd and replace it with d_path().
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/oplock.c')
-rw-r--r-- | fs/ksmbd/oplock.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/fs/ksmbd/oplock.c b/fs/ksmbd/oplock.c index 23871b18a429..8b5560574d4c 100644 --- a/fs/ksmbd/oplock.c +++ b/fs/ksmbd/oplock.c @@ -1694,33 +1694,3 @@ out: read_unlock(&lease_list_lock); return ret_op; } - -int smb2_check_durable_oplock(struct ksmbd_file *fp, - struct lease_ctx_info *lctx, char *name) -{ - struct oplock_info *opinfo = opinfo_get(fp); - int ret = 0; - - if (opinfo && opinfo->is_lease) { - if (!lctx) { - pr_err("open does not include lease\n"); - ret = -EBADF; - goto out; - } - if (memcmp(opinfo->o_lease->lease_key, lctx->lease_key, - SMB2_LEASE_KEY_SIZE)) { - pr_err("invalid lease key\n"); - ret = -EBADF; - goto out; - } - if (name && strcmp(fp->filename, name)) { - pr_err("invalid name reconnect %s\n", name); - ret = -EINVAL; - goto out; - } - } -out: - if (opinfo) - opinfo_put(opinfo); - return ret; -} |