Loading fs/cifs/cache.c +0 −24 Original line number Diff line number Diff line Loading @@ -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, Loading fs/cifs/cifsproto.h +1 −0 Original line number Diff line number Diff line Loading @@ -618,6 +618,7 @@ struct super_block *cifs_get_tcp_super(struct TCP_Server_Info *server); void cifs_put_tcp_super(struct super_block *sb); int update_super_prepath(struct cifs_tcon *tcon, char *prefix); char *extract_hostname(const char *unc); char *extract_sharename(const char *unc); #ifdef CONFIG_CIFS_DFS_UPCALL static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses, Loading fs/cifs/fscache.c +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "cifsglob.h" #include "cifs_debug.h" #include "cifs_fs_sb.h" #include "cifsproto.h" /* * Key layout of CIFS server cache index object Loading fs/cifs/fscache.h +0 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ extern const struct fscache_cookie_def cifs_fscache_inode_object_def; extern int cifs_fscache_register(void); extern void cifs_fscache_unregister(void); extern char *extract_sharename(const char *); /* * fscache.c Loading fs/cifs/misc.c +24 −0 Original line number Diff line number Diff line Loading @@ -1227,3 +1227,27 @@ char *extract_hostname(const char *unc) return dst; } char *extract_sharename(const char *unc) { const char *src; char *delim, *dst; int len; /* skip double chars at the beginning */ src = unc + 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; } Loading
fs/cifs/cache.c +0 −24 Original line number Diff line number Diff line Loading @@ -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, Loading
fs/cifs/cifsproto.h +1 −0 Original line number Diff line number Diff line Loading @@ -618,6 +618,7 @@ struct super_block *cifs_get_tcp_super(struct TCP_Server_Info *server); void cifs_put_tcp_super(struct super_block *sb); int update_super_prepath(struct cifs_tcon *tcon, char *prefix); char *extract_hostname(const char *unc); char *extract_sharename(const char *unc); #ifdef CONFIG_CIFS_DFS_UPCALL static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses, Loading
fs/cifs/fscache.c +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include "cifsglob.h" #include "cifs_debug.h" #include "cifs_fs_sb.h" #include "cifsproto.h" /* * Key layout of CIFS server cache index object Loading
fs/cifs/fscache.h +0 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ extern const struct fscache_cookie_def cifs_fscache_inode_object_def; extern int cifs_fscache_register(void); extern void cifs_fscache_unregister(void); extern char *extract_sharename(const char *); /* * fscache.c Loading
fs/cifs/misc.c +24 −0 Original line number Diff line number Diff line Loading @@ -1227,3 +1227,27 @@ char *extract_hostname(const char *unc) return dst; } char *extract_sharename(const char *unc) { const char *src; char *delim, *dst; int len; /* skip double chars at the beginning */ src = unc + 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; }