Skip to content

Commit e154cb7

Browse files
sprasad-microsoftSteve French
authored andcommitted
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 <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 8a409cd commit e154cb7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/cifs/connect.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,10 @@ static int __cifs_reconnect(struct TCP_Server_Info *server,
338338
}
339339
} while (server->tcpStatus == CifsNeedReconnect);
340340

341+
spin_lock(&cifs_tcp_ses_lock);
341342
if (server->tcpStatus == CifsNeedNegotiate)
342343
mod_delayed_work(cifsiod_wq, &server->echo, 0);
344+
spin_unlock(&cifs_tcp_ses_lock);
343345

344346
wake_up(&server->response_q);
345347
return rc;
@@ -454,6 +456,7 @@ reconnect_dfs_server(struct TCP_Server_Info *server,
454456
spin_unlock(&cifs_tcp_ses_lock);
455457
cifs_swn_reset_server_dstaddr(server);
456458
mutex_unlock(&server->srv_mutex);
459+
mod_delayed_work(cifsiod_wq, &server->reconnect, 0);
457460
} while (server->tcpStatus == CifsNeedReconnect);
458461

459462
if (target_hint)

0 commit comments

Comments
 (0)