diff options
author | Paulo Alcantara <pc@cjr.nz> | 2022-03-31 15:01:50 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-04-04 12:01:22 -0500 |
commit | 687127c81ad32c8900a3fedbc7ed8f686ca95855 (patch) | |
tree | 90d74ec9f57dec31f6630ee72bedb8e04a9d7e04 /fs/cifs/connect.c | |
parent | Linux 5.18-rc1 (diff) | |
download | linux-dev-687127c81ad32c8900a3fedbc7ed8f686ca95855.tar.xz linux-dev-687127c81ad32c8900a3fedbc7ed8f686ca95855.zip |
cifs: fix potential race with cifsd thread
To avoid racing with demultiplex thread while it is handling data on
socket, use cifs_signal_cifsd_for_reconnect() helper for marking
current server to reconnect and let the demultiplex thread handle the
rest.
Fixes: dca65818c80c ("cifs: use a different reconnect helper for non-cifsd threads")
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index ee3b7c15e884..3ca06bd88b6e 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -4465,7 +4465,7 @@ static int tree_connect_dfs_target(const unsigned int xid, struct cifs_tcon *tco */ if (rc && server->current_fullpath != server->origin_fullpath) { server->current_fullpath = server->origin_fullpath; - cifs_reconnect(tcon->ses->server, true); + cifs_signal_cifsd_for_reconnect(server, true); } dfs_cache_free_tgts(tl); |