diff options
author | Samuel Cabrero <scabrero@suse.de> | 2020-11-30 19:02:48 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2020-12-14 16:16:22 +0100 |
commit | e73a42e07a2246ecd8b0cad70824d26ab07985c2 (patch) | |
tree | 3de15027ab55dcbf92a4fbd3c4f7bb3392f01707 /fs/cifs/cache.c | |
parent | cifs: Make extract_hostname function public (diff) | |
download | linux-e73a42e07a2246ecd8b0cad70824d26ab07985c2.tar.xz linux-e73a42e07a2246ecd8b0cad70824d26ab07985c2.zip |
cifs: Make extract_sharename function public
Move the function to misc.c
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cache.c')
-rw-r--r-- | fs/cifs/cache.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/cifs/cache.c b/fs/cifs/cache.c index 0f2adecb94f2..488fe0ffc1ef 100644 --- a/fs/cifs/cache.c +++ b/fs/cifs/cache.c @@ -53,30 +53,6 @@ const struct fscache_cookie_def cifs_fscache_server_index_def = { .type = FSCACHE_COOKIE_TYPE_INDEX, }; -char *extract_sharename(const char *treename) -{ - const char *src; - char *delim, *dst; - int len; - - /* skip double chars at the beginning */ - src = treename + 2; - - /* share name is always preceded by '\\' now */ - delim = strchr(src, '\\'); - if (!delim) - return ERR_PTR(-EINVAL); - delim++; - len = strlen(delim); - - /* caller has to free the memory */ - dst = kstrndup(delim, len, GFP_KERNEL); - if (!dst) - return ERR_PTR(-ENOMEM); - - return dst; -} - static enum fscache_checkaux cifs_fscache_super_check_aux(void *cookie_netfs_data, const void *data, |