From: Stephen Rothwell sfr@canb.auug.org.au
mainline inclusion from mainline-5.15-rc1 commit 36ba38663be0a1b34aee1c79f3bb359fcac96c55 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/36ba38663be0
-------------------------------
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 Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/misc.c | 4 ++-- fs/cifsd/misc.h | 2 +- fs/cifsd/smb2pdu.c | 2 +- fs/cifsd/unicode.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/cifsd/misc.c b/fs/cifsd/misc.c index 9e689c33f7bb..68983b08d519 100644 --- a/fs/cifsd/misc.c +++ b/fs/cifsd/misc.c @@ -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; diff --git a/fs/cifsd/misc.h b/fs/cifsd/misc.h index d67843aad509..41b3dac2f5fc 100644 --- a/fs/cifsd/misc.h +++ b/fs/cifsd/misc.h @@ -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);
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c index b20cc07ee809..a4e78ebb0773 100644 --- a/fs/cifsd/smb2pdu.c +++ b/fs/cifsd/smb2pdu.c @@ -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; diff --git a/fs/cifsd/unicode.h b/fs/cifsd/unicode.h index 228a02c9b95d..7135d62bf9b0 100644 --- a/fs/cifsd/unicode.h +++ b/fs/cifsd/unicode.h @@ -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);