Skip to content

Commit

Permalink
cifs: fix dfs-links
Browse files Browse the repository at this point in the history
This fixes a regression following dfs links that was introduced in the
patch series for the new mount api.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Ronnie Sahlberg authored and Steve French committed Feb 9, 2021
1 parent 92bf226 commit abd4af4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2983,6 +2983,14 @@ expand_dfs_referral(const unsigned int xid, struct cifs_ses *ses,
rc = PTR_ERR(mdata);
mdata = NULL;
} else {
/*
* We can not clear out the whole structure since we
* no longer have an explicit function to parse
* a mount-string. Instead we need to clear out the
* individual fields that are no longer valid.
*/
kfree(ctx->prepath);
ctx->prepath = NULL;
rc = cifs_setup_volume_info(ctx, mdata, fake_devname);
}
kfree(fake_devname);
Expand Down

0 comments on commit abd4af4

Please sign in to comment.