]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cifs: Fix locking usage for tcon fields
authorShyam Prasad N <sprasad@microsoft.com>
Sat, 31 Jan 2026 18:51:13 +0000 (00:21 +0530)
committerSteve French <stfrench@microsoft.com>
Sun, 8 Feb 2026 23:07:43 +0000 (17:07 -0600)
commit96c4af418586ee9a6aab61738644366426e05316
tree45806be1d48268cca1c897ae31d365e86aa035a3
parent037ddbcc107acbf3e45e7f5841a92ceb87001ee3
cifs: Fix locking usage for tcon fields

We used to use the cifs_tcp_ses_lock to protect a lot of objects
that are not just the server, ses or tcon lists. We later introduced
srv_lock, ses_lock and tc_lock to protect fields within the
corresponding structs. This was done to provide a more granular
protection and avoid unnecessary serialization.

There were still a couple of uses of cifs_tcp_ses_lock to provide
tcon fields. In this patch, I've replaced them with tc_lock.

Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cached_dir.c
fs/smb/client/smb2misc.c
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c
fs/smb/client/trace.h