]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: remove unnecessary locking of chan_lock while freeing session
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 6 Jul 2022 14:29:12 +0000 (14:29 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 12 Jul 2022 15:35:48 +0000 (10:35 -0500)
commit6b871b9a4c17095c83e3ed470f83ad9ea4a43378
tree2b432ca2e97cd32b0d85854d31ad7bf51dd33d6b
parente6589ede4da221682151b8b6078ad2795b5b492d
cifs: remove unnecessary locking of chan_lock while freeing session

In cifs_put_smb_ses, when we're freeing the last ref count to
the session, we need to free up each channel. At this point,
it is unnecessary to take chan_lock, since we have the last
reference to the ses.

Picking up this lock also introduced a deadlock because it calls
cifs_put_tcp_ses, which locks cifs_tcp_ses_lock.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Acked-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c