diff options
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 0521492f5b3b..aa0669a82922 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -50,7 +50,6 @@ build_path_from_dentry(struct dentry *direntry) | |||
50 | { | 50 | { |
51 | struct dentry *temp; | 51 | struct dentry *temp; |
52 | int namelen; | 52 | int namelen; |
53 | int pplen; | ||
54 | int dfsplen; | 53 | int dfsplen; |
55 | char *full_path; | 54 | char *full_path; |
56 | char dirsep; | 55 | char dirsep; |
@@ -63,13 +62,12 @@ build_path_from_dentry(struct dentry *direntry) | |||
63 | when the server crashed */ | 62 | when the server crashed */ |
64 | 63 | ||
65 | dirsep = CIFS_DIR_SEP(cifs_sb); | 64 | dirsep = CIFS_DIR_SEP(cifs_sb); |
66 | pplen = cifs_sb->prepathlen; | ||
67 | if (tcon->Flags & SMB_SHARE_IS_IN_DFS) | 65 | if (tcon->Flags & SMB_SHARE_IS_IN_DFS) |
68 | dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1); | 66 | dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1); |
69 | else | 67 | else |
70 | dfsplen = 0; | 68 | dfsplen = 0; |
71 | cifs_bp_rename_retry: | 69 | cifs_bp_rename_retry: |
72 | namelen = pplen + dfsplen; | 70 | namelen = dfsplen; |
73 | for (temp = direntry; !IS_ROOT(temp);) { | 71 | for (temp = direntry; !IS_ROOT(temp);) { |
74 | namelen += (1 + temp->d_name.len); | 72 | namelen += (1 + temp->d_name.len); |
75 | temp = temp->d_parent; | 73 | temp = temp->d_parent; |
@@ -100,7 +98,7 @@ cifs_bp_rename_retry: | |||
100 | return NULL; | 98 | return NULL; |
101 | } | 99 | } |
102 | } | 100 | } |
103 | if (namelen != pplen + dfsplen) { | 101 | if (namelen != dfsplen) { |
104 | cERROR(1, "did not end path lookup where expected namelen is %d", | 102 | cERROR(1, "did not end path lookup where expected namelen is %d", |
105 | namelen); | 103 | namelen); |
106 | /* presumably this is only possible if racing with a rename | 104 | /* presumably this is only possible if racing with a rename |
@@ -126,7 +124,6 @@ cifs_bp_rename_retry: | |||
126 | } | 124 | } |
127 | } | 125 | } |
128 | } | 126 | } |
129 | strncpy(full_path + dfsplen, CIFS_SB(direntry->d_sb)->prepath, pplen); | ||
130 | return full_path; | 127 | return full_path; |
131 | } | 128 | } |
132 | 129 | ||