diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2022-01-16 11:19:36 +0000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-01-19 11:10:55 -0600 |
commit | e154cb7b0ab961f9d785ed34c2d7128413e7083d (patch) | |
tree | 28996ef93aac3041c93a849c60fb480287820af0 /fs/cifs | |
parent | 8a409cda978e212661b8c032e1b08b3b0b0f9d36 (diff) | |
download | linux-stable-e154cb7b0ab961f9d785ed34c2d7128413e7083d.tar.gz linux-stable-e154cb7b0ab961f9d785ed34c2d7128413e7083d.tar.bz2 linux-stable-e154cb7b0ab961f9d785ed34c2d7128413e7083d.zip |
cifs: fix the cifs_reconnect path for DFS
Recently, the cifs_reconnect code was refactored into
two branches for regular vs dfs codepath. Some of my
recent changes were missing in the dfs path, namely the
code to enable periodic DNS query, and a missing lock.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/connect.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d643f9e16f4e..4a31a9b3f34f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -338,8 +338,10 @@ static int __cifs_reconnect(struct TCP_Server_Info *server, } } while (server->tcpStatus == CifsNeedReconnect); + spin_lock(&cifs_tcp_ses_lock); if (server->tcpStatus == CifsNeedNegotiate) mod_delayed_work(cifsiod_wq, &server->echo, 0); + spin_unlock(&cifs_tcp_ses_lock); wake_up(&server->response_q); return rc; @@ -454,6 +456,7 @@ reconnect_dfs_server(struct TCP_Server_Info *server, spin_unlock(&cifs_tcp_ses_lock); cifs_swn_reset_server_dstaddr(server); mutex_unlock(&server->srv_mutex); + mod_delayed_work(cifsiod_wq, &server->reconnect, 0); } while (server->tcpStatus == CifsNeedReconnect); if (target_hint) |