Commit 80917f17 authored by Marios Makassikis's avatar Marios Makassikis Committed by Steve French

ksmbd: Remove unused parameter from smb2_get_name()

The 'share' parameter is no longer used by smb2_get_name() since
commit 265fd199 ("ksmbd: use LOOKUP_BENEATH to prevent the out of
share access").
Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarMarios Makassikis <mmakassikis@freebox.fr>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 29427741
...@@ -610,7 +610,6 @@ static void destroy_previous_session(struct ksmbd_user *user, u64 id) ...@@ -610,7 +610,6 @@ static void destroy_previous_session(struct ksmbd_user *user, u64 id)
/** /**
* smb2_get_name() - get filename string from on the wire smb format * smb2_get_name() - get filename string from on the wire smb format
* @share: ksmbd_share_config pointer
* @src: source buffer * @src: source buffer
* @maxlen: maxlen of source string * @maxlen: maxlen of source string
* @nls_table: nls_table pointer * @nls_table: nls_table pointer
...@@ -618,8 +617,7 @@ static void destroy_previous_session(struct ksmbd_user *user, u64 id) ...@@ -618,8 +617,7 @@ static void destroy_previous_session(struct ksmbd_user *user, u64 id)
* Return: matching converted filename on success, otherwise error ptr * Return: matching converted filename on success, otherwise error ptr
*/ */
static char * static char *
smb2_get_name(struct ksmbd_share_config *share, const char *src, smb2_get_name(const char *src, const int maxlen, struct nls_table *local_nls)
const int maxlen, struct nls_table *local_nls)
{ {
char *name; char *name;
...@@ -2530,8 +2528,7 @@ int smb2_open(struct ksmbd_work *work) ...@@ -2530,8 +2528,7 @@ int smb2_open(struct ksmbd_work *work)
goto err_out1; goto err_out1;
} }
name = smb2_get_name(share, name = smb2_get_name(req->Buffer,
req->Buffer,
le16_to_cpu(req->NameLength), le16_to_cpu(req->NameLength),
work->conn->local_nls); work->conn->local_nls);
if (IS_ERR(name)) { if (IS_ERR(name)) {
...@@ -5398,8 +5395,7 @@ static int smb2_rename(struct ksmbd_work *work, ...@@ -5398,8 +5395,7 @@ static int smb2_rename(struct ksmbd_work *work,
goto out; goto out;
} }
new_name = smb2_get_name(share, new_name = smb2_get_name(file_info->FileName,
file_info->FileName,
le32_to_cpu(file_info->FileNameLength), le32_to_cpu(file_info->FileNameLength),
local_nls); local_nls);
if (IS_ERR(new_name)) { if (IS_ERR(new_name)) {
...@@ -5510,8 +5506,7 @@ static int smb2_create_link(struct ksmbd_work *work, ...@@ -5510,8 +5506,7 @@ static int smb2_create_link(struct ksmbd_work *work,
if (!pathname) if (!pathname)
return -ENOMEM; return -ENOMEM;
link_name = smb2_get_name(share, link_name = smb2_get_name(file_info->FileName,
file_info->FileName,
le32_to_cpu(file_info->FileNameLength), le32_to_cpu(file_info->FileNameLength),
local_nls); local_nls);
if (IS_ERR(link_name) || S_ISDIR(file_inode(filp)->i_mode)) { if (IS_ERR(link_name) || S_ISDIR(file_inode(filp)->i_mode)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment