diff options
author | Paulo Alcantara <pc@cjr.nz> | 2021-11-16 17:38:58 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-11-16 17:57:08 +0100 |
commit | 8ae87bbeb5d1bfd4ddf2f73f72be51d02d6be2eb (patch) | |
tree | 85dc294eabd65bf74decdc3e214d6697e7e6b933 /fs/cifs/dfs_cache.c | |
parent | cifs: protect srv_count with cifs_tcp_ses_lock (diff) | |
download | linux-8ae87bbeb5d1bfd4ddf2f73f72be51d02d6be2eb.tar.xz linux-8ae87bbeb5d1bfd4ddf2f73f72be51d02d6be2eb.zip |
cifs: introduce cifs_ses_mark_for_reconnect() helper
Use new cifs_ses_mark_for_reconnect() helper to mark all session
channels for reconnect instead of duplicating it in different places.
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/dfs_cache.c')
-rw-r--r-- | fs/cifs/dfs_cache.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c index 5c1259d2eeac..e9b0fa2a9614 100644 --- a/fs/cifs/dfs_cache.c +++ b/fs/cifs/dfs_cache.c @@ -1355,12 +1355,7 @@ static void mark_for_reconnect_if_needed(struct cifs_tcon *tcon, struct dfs_cach } cifs_dbg(FYI, "%s: no cached or matched targets. mark dfs share for reconnect.\n", __func__); - for (i = 0; i < tcon->ses->chan_count; i++) { - spin_lock(&GlobalMid_Lock); - if (tcon->ses->chans[i].server->tcpStatus != CifsExiting) - tcon->ses->chans[i].server->tcpStatus = CifsNeedReconnect; - spin_unlock(&GlobalMid_Lock); - } + cifs_ses_mark_for_reconnect(tcon->ses); } /* Refresh dfs referral of tcon and mark it for reconnect if needed */ |