]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: take cifs_tcp_ses_lock for status checks
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 19 Jul 2021 17:05:53 +0000 (17:05 +0000)
committerSteve French <stfrench@microsoft.com>
Sat, 8 Jan 2022 02:07:07 +0000 (20:07 -0600)
commite35bb7a3d0ef7ffc3b6e87b2eb02d3f293890b38
tree417e32ff394a376212b5e5d2491564c9eb27c574
parent4bc7dcf6163ef08fffbfeaebc4f11ce84c32bcb0
cifs: take cifs_tcp_ses_lock for status checks

While checking/updating status for tcp ses, smb ses or tcon,
we take GlobalMid_Lock. This doesn't make any sense.
Replaced it with cifs_tcp_ses_lock.

Ideally, we should take a spin lock per struct.
But since tcp ses, smb ses and tcon objects won't add up to a lot,
I think there should not be too much contention.

Also, in few other places, these are checked without locking.
Added locking for these.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
12 files changed:
fs/cifs/cifs_swn.c
fs/cifs/cifsencrypt.c
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/netmisc.c
fs/cifs/sess.c
fs/cifs/smb1ops.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2transport.c
fs/cifs/transport.c