]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: unlock chan_lock before calling cifs_put_tcp_session
authorShyam Prasad N <sprasad@microsoft.com>
Sat, 29 Jan 2022 09:32:33 +0000 (09:32 +0000)
committerSteve French <stfrench@microsoft.com>
Sat, 29 Jan 2022 18:41:54 +0000 (12:41 -0600)
commit1b8f1b69d3a2e1f79cf65a48cd6a188104e29ef9
tree0b34b4297103e44ba14221fcdd7c968ead46a9bd
parent84397365ee7069b41cab270a131fa64cf4bc0e8e
cifs: unlock chan_lock before calling cifs_put_tcp_session

While removing an smb session, we need to free up the
tcp session for each channel for that session. We were
doing this with chan_lock held. This results in a
cyclic dependency with cifs_tcp_ses_lock.

For now, unlock the chan_lock temporarily before calling
cifs_put_tcp_session. This should not cause any problem
for now, since we do not remove channels anywhere else.
And this code segment will not be called by two threads.

When we do implement the code for removing channels, we
will need to execute proper ref counting here.

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