aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/inode.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 7e4c24491729..bc673c8c1e6b 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -211,7 +211,10 @@ try_again_CIFSSMBUnixQPathInfo:
211 if (rc) { 211 if (rc) {
212 if (rc == -EREMOTE && !is_dfs_referral) { 212 if (rc == -EREMOTE && !is_dfs_referral) {
213 is_dfs_referral = true; 213 is_dfs_referral = true;
214 full_path = search_path; 214 if (full_path != search_path) {
215 kfree(full_path);
216 full_path = search_path;
217 }
215 goto try_again_CIFSSMBUnixQPathInfo; 218 goto try_again_CIFSSMBUnixQPathInfo;
216 } 219 }
217 goto cgiiu_exit; 220 goto cgiiu_exit;
@@ -422,7 +425,10 @@ try_again_CIFSSMBQPathInfo:
422 if (rc) { 425 if (rc) {
423 if (rc == -EREMOTE && !is_dfs_referral) { 426 if (rc == -EREMOTE && !is_dfs_referral) {
424 is_dfs_referral = true; 427 is_dfs_referral = true;
425 full_path = search_path; 428 if (full_path != search_path) {
429 kfree(full_path);
430 full_path = search_path;
431 }
426 goto try_again_CIFSSMBQPathInfo; 432 goto try_again_CIFSSMBQPathInfo;
427 } 433 }
428 goto cgii_exit; 434 goto cgii_exit;