Re: [PATCH v2] rust: sync: inline various lock related methods
From: Boqun Feng
Date: Wed Jan 07 2026 - 20:05:55 EST
On Thu, Dec 18, 2025 at 12:10:23PM +0000, Alice Ryhl wrote:
> While debugging a different issue [1], I inspected a rust_binder.ko file
> and noticed the following relocation:
>
> R_AARCH64_CALL26 _RNvXNtNtNtCsdfZWD8DztAw_6kernel4sync4lock8spinlockNtB2_15SpinLockBackendNtB4_7Backend6unlock
>
> This relocation (and a similar one for lock) occurred many times
> throughout the module. That is not really useful because all this
> function does is call spin_unlock(), so what we actually want here is
> that a call to spin_unlock() dirctly is generated in favor of this
> wrapper method.
>
> Thus, mark these methods inline.
>
> Link: https://lore.kernel.org/p/20251111-binder-fix-list-remove-v1-0-8ed14a0da63d@xxxxxxxxxx
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> ---
> Changes in v2:
> - Rebased on v6.19-rc1.
> - Link to v1: https://lore.kernel.org/r/20251113-inline-lock-unlock-v1-1-1b6e8c323bcf@xxxxxxxxxx
Queued, thanks you!
Regards,
Boqun