diff options
author | Paulo Alcantara <pc@cjr.nz> | 2021-12-02 15:29:35 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-02 17:41:12 +0100 |
commit | 5c5c563a0817f565611ead1e4f60d1198a89647f (patch) | |
tree | a30d72a6552bf68f3c853b81c262d799398d2862 | |
parent | ee2d04f23bbb16208045c3de545c6127aaa1ed0e (diff) |
cifs: fix missed refcounting of ipc tcon
commit 65de262a209da0951eb9bc60b3b7faf3bbffa38a upstream.
Fix missed refcounting of IPC tcon used for getting domain-based DFS
root referrals. We want to keep it alive as long as mount is active
and can be refreshed. For standalone DFS root referrals it wouldn't
be a problem as the client ends up having an IPC tcon for both mount
and cache.
Fixes: c88f7dcd6d64 ("cifs: support nested dfs links over reconnect")
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/cifs/connect.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 839059b8a9c9..c6e2a0ff8f0c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3390,6 +3390,7 @@ static int connect_dfs_root(struct mount_ctx *mnt_ctx, struct dfs_cache_tgt_list */ mount_put_conns(mnt_ctx); mount_get_dfs_conns(mnt_ctx); + set_root_ses(mnt_ctx); full_path = build_unc_path_to_root(ctx, cifs_sb, true); if (IS_ERR(full_path)) |