diff options
author | 2020-07-21 09:36:42 -0300 | |
---|---|---|
committer | 2020-08-02 18:00:26 -0500 | |
commit | 7548e1da8d2d345debb9c0f141c47e4077d6085b (patch) | |
tree | 48724a7d4acc095f10a8d1ae5223841b82e2ede6 /fs/cifs/misc.c | |
parent | cifs: handle empty list of targets in cifs_reconnect() (diff) | |
download | linux-7548e1da8d2d345debb9c0f141c47e4077d6085b.tar.gz linux-7548e1da8d2d345debb9c0f141c47e4077d6085b.tar.bz2 linux-7548e1da8d2d345debb9c0f141c47e4077d6085b.zip |
cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect
Use PathConsumed field when parsing prefixes of referral paths that
either match a cache entry or are a complete prefix path of an
existing entry.
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index e44d049142d0..764234803071 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -1164,8 +1164,7 @@ static inline void cifs_put_tcon_super(struct super_block *sb) } #endif -int update_super_prepath(struct cifs_tcon *tcon, const char *prefix, - size_t prefix_len) +int update_super_prepath(struct cifs_tcon *tcon, char *prefix) { struct super_block *sb; struct cifs_sb_info *cifs_sb; @@ -1179,8 +1178,8 @@ int update_super_prepath(struct cifs_tcon *tcon, const char *prefix, kfree(cifs_sb->prepath); - if (*prefix && prefix_len) { - cifs_sb->prepath = kstrndup(prefix, prefix_len, GFP_ATOMIC); + if (prefix && *prefix) { + cifs_sb->prepath = kstrndup(prefix, strlen(prefix), GFP_ATOMIC); if (!cifs_sb->prepath) { rc = -ENOMEM; goto out; |