diff options
author | Wang Zhaolong <wangzhaolong@huaweicloud.com> | 2025-08-04 21:40:04 +0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2025-08-05 11:29:00 -0500 |
commit | 9bd42798d5bf87f56d229a27e40140df95ef743d (patch) | |
tree | c12418527b0a7045471b3cee1f97ffb5b5978959 /rust/helpers/mutex.c | |
parent | f3ba7c9b0421e3935998334a860bd88f2ffdb18e (diff) |
smb: client: add mid_counter_lock to protect the mid counter counter
This is step 2/4 of a patch series to fix mid_q_entry memory leaks
caused by race conditions in callback execution.
Add a dedicated mid_counter_lock to protect current_mid counter,
separating it from mid_queue_lock which protects pending_mid_q
operations. This reduces lock contention and prepares for finer-
grained locking in subsequent patches.
Changes:
- Add TCP_Server_Info->mid_counter_lock spinlock
- Rename CurrentMid to current_mid for consistency
- Use mid_counter_lock to protect current_mid access
- Update locking documentation in cifsglob.h
This separation allows mid allocation to proceed without blocking
queue operations, improving performance under heavy load.
Signed-off-by: Wang Zhaolong <wangzhaolong@huaweicloud.com>
Acked-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions