smb: server: make consitent use of spin_lock_irq{save,restore}() in transport_rdma.c
authorStefan Metzmacher <metze@samba.org>
Wed, 27 Aug 2025 13:54:35 +0000 (15:54 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:54 +0000 (18:29 -0500)
commit8aa23bae607e3bd5ced892afc26bfbe8945f531b
tree539aa404cadaaff2dc5767d53d8e8ea1c3d92a0f
parent0491f26f8980d7a4028d3528df09e23f5a64adbe
smb: server: make consitent use of spin_lock_irq{save,restore}() in transport_rdma.c

There is a mix of using spin_lock() and spin_lock_irq(), which
is confusing as IB_POLL_WORKQUEUE is used and no code would
be called from any interrupt. So using spin_lock() or even
mutexes would be ok.

But we'll soon share common code with the client, which uses
IB_POLL_SOFTIRQ.

And Documentation/kernel-hacking/locking.rst section
"Cheat Sheet For Locking" says:

-  Otherwise (== data can be touched in an interrupt), use
   spin_lock_irqsave() and
   spin_unlock_irqrestore().

So in order to keep it simple and safe we use that version
now. It will help merging functions into common code and
have consistent locking in all cases.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_rdma.c