diff options
author | Wang Zhaolong <wangzhaolong@huaweicloud.com> | 2025-08-04 21:40:05 +0800 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2025-08-05 11:29:31 -0500 |
commit | 3fd8ec2fc93b009e5288b123d77292b8b1b9e1e7 (patch) | |
tree | e30a79b62c7224124a4c52b05724a912938979d5 /rust/helpers/mutex.c | |
parent | 9bd42798d5bf87f56d229a27e40140df95ef743d (diff) |
smb: client: smb: client: eliminate mid_flags field
This is step 3/4 of a patch series to fix mid_q_entry memory leaks
caused by race conditions in callback execution.
Replace the mid_flags bitmask with dedicated boolean fields to
simplify locking logic and improve code readability:
- Replace MID_DELETED with bool deleted_from_q
- Replace MID_WAIT_CANCELLED with bool wait_cancelled
- Remove mid_flags field entirely
The new boolean fields have clearer semantics:
- deleted_from_q: whether mid has been removed from pending_mid_q
- wait_cancelled: whether request was cancelled during wait
This change reduces memory usage (from 4-byte bitmask to 2 boolean
flags) and eliminates confusion about which lock protects which
flag bits, preparing for per-mid locking in the next patch.
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