Skip to content

Commit abd4af4

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
cifs: fix dfs-links
This fixes a regression following dfs links that was introduced in the patch series for the new mount api. Signed-off-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 92bf226 commit abd4af4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fs/cifs/connect.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,6 +2983,14 @@ expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses,
29832983
rc = PTR_ERR(mdata);
29842984
mdata = NULL;
29852985
} else {
2986+
/*
2987+
* We can not clear out the whole structure since we
2988+
* no longer have an explicit function to parse
2989+
* a mount-string. Instead we need to clear out the
2990+
* individual fields that are no longer valid.
2991+
*/
2992+
kfree(ctx->prepath);
2993+
ctx->prepath = NULL;
29862994
rc = cifs_setup_volume_info(ctx, mdata, fake_devname);
29872995
}
29882996
kfree(fake_devname);

0 commit comments

Comments
 (0)