diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-05-27 20:39:52 +0400 |
---|---|---|
committer | Pavel Shilovsky <pshilovsky@samba.org> | 2012-07-24 21:55:10 +0400 |
commit | 9224dfc2f92f4faff7b3d9e169255278129b47e8 (patch) | |
tree | 43a5736568aaf772a1612d15d55781d33a643fd5 /fs/cifs/inode.c | |
parent | be4cb9e3d4ef7af1aaf66cebab1391ff91b48beb (diff) | |
download | op-kernel-dev-9224dfc2f92f4faff7b3d9e169255278129b47e8.zip op-kernel-dev-9224dfc2f92f4faff7b3d9e169255278129b47e8.tar.gz |
CIFS: Move building path to root to ops struct
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index df071fb..def1006 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -731,38 +731,6 @@ static const struct inode_operations cifs_ipc_inode_ops = { .lookup = cifs_lookup, }; -char *cifs_build_path_to_root(struct smb_vol *vol, struct cifs_sb_info *cifs_sb, - struct cifs_tcon *tcon) -{ - int pplen = vol->prepath ? strlen(vol->prepath) : 0; - int dfsplen; - char *full_path = NULL; - - /* if no prefix path, simply set path to the root of share to "" */ - if (pplen == 0) { - full_path = kmalloc(1, GFP_KERNEL); - if (full_path) - full_path[0] = 0; - return full_path; - } - - if (tcon->Flags & SMB_SHARE_IS_IN_DFS) - dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1); - else - dfsplen = 0; - - full_path = kmalloc(dfsplen + pplen + 1, GFP_KERNEL); - if (full_path == NULL) - return full_path; - - if (dfsplen) - strncpy(full_path, tcon->treeName, dfsplen); - strncpy(full_path + dfsplen, vol->prepath, pplen); - convert_delimiter(full_path, CIFS_DIR_SEP(cifs_sb)); - full_path[dfsplen + pplen] = 0; /* add trailing null */ - return full_path; -} - static int cifs_find_inode(struct inode *inode, void *opaque) { |