cifsd: uniquify extract_sharename()

uniquify extract_sharename().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
Stephen Rothwell 2021-03-17 17:01:15 +09:00 committed by Steve French
parent 42da4086b9
commit 36ba38663b
4 changed files with 5 additions and 5 deletions

View File

@ -210,12 +210,12 @@ void ksmbd_conv_path_to_windows(char *path)
}
/**
* extract_sharename() - get share name from tree connect request
* ksmbd_extract_sharename() - get share name from tree connect request
* @treename: buffer containing tree name and share name
*
* Return: share name on success, otherwise error
*/
char *extract_sharename(char *treename)
char *ksmbd_extract_sharename(char *treename)
{
char *name = treename;
char *dst;

View File

@ -25,7 +25,7 @@ void ksmbd_conv_path_to_unix(char *path);
void ksmbd_strip_last_slash(char *path);
void ksmbd_conv_path_to_windows(char *path);
char *extract_sharename(char *treename);
char *ksmbd_extract_sharename(char *treename);
char *convert_to_unix_name(struct ksmbd_share_config *share, char *name);

View File

@ -1709,7 +1709,7 @@ int smb2_tree_connect(struct ksmbd_work *work)
goto out_err1;
}
name = extract_sharename(treename);
name = ksmbd_extract_sharename(treename);
if (IS_ERR(name)) {
status.ret = KSMBD_TREE_CONN_STATUS_ERROR;
goto out_err1;

View File

@ -69,7 +69,7 @@ char *smb_strndup_from_utf16(const char *src, const int maxlen,
const struct nls_table *codepage);
extern int smbConvertToUTF16(__le16 *target, const char *source, int srclen,
const struct nls_table *cp, int mapchars);
extern char *extract_sharename(char *treename);
extern char *ksmbd_extract_sharename(char *treename);
#endif
wchar_t cifs_toupper(wchar_t in);