cifs: avoid parallel session setups on same channel
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 8 Apr 2022 13:31:37 +0000 (13:31 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 24 May 2022 19:16:32 +0000 (14:16 -0500)
commit5752bf645f9dd7db600651f726eb04a97c9f597f
treef486c71eb05d7e37800e182d49325838ac0c2af3
parentdd3cd8709ed5f4ae8998e0cd44c05bd26bc879e8
cifs: avoid parallel session setups on same channel

After allowing channels to reconnect in parallel, it now
becomes important to take care that multiple processes do not
call negotiate/session setup in parallel on the same channel.

This change avoids that by marking a channel as "in_reconnect".
During session setup if the channel in question has this flag
set, we return immediately.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifs_debug.c
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/sess.c