umber-kernel/rust/kernel/sync
Alexandre Courbot e82f822ed1 rust: sync: refcount: always inline functions using build_assert with arguments
commit d6ff6e870077ae0f01a6f860ca1e4a5a825dc032 upstream.

`build_assert` relies on the compiler to optimize out its error path.
Functions using it with its arguments must thus always be inlined,
otherwise the error path of `build_assert` might not be optimized out,
triggering a build error.

Cc: stable@vger.kernel.org
Fixes: bb38f35b35 ("rust: implement `kernel::sync::Refcount`")
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://patch.msgid.link/20251208-io-build-assert-v3-5-98aded02c1ea@nvidia.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-06 16:57:41 +01:00
..
arc
atomic rust: sync: atomic: Provide stub for `rusttest` 32-bit hosts 2026-02-06 16:57:41 +01:00
lock
arc.rs Rust changes for v6.18 2025-09-30 19:12:49 -07:00
aref.rs rust: sync: extend module documentation of aref 2025-09-15 00:02:22 +02:00
atomic.rs rust: sync: atomic: Add the framework of arithmetic operations 2025-09-15 09:38:34 +02:00
barrier.rs rust: sync: Add memory barriers 2025-09-15 09:38:34 +02:00
completion.rs
condvar.rs rust: condvar: fix broken intra-doc link 2025-11-02 23:18:42 +01:00
lock.rs rust: sync: Add #[must_use] to Lock::try_lock() 2025-07-11 15:11:54 -07:00
locked_by.rs
poll.rs Scheduler updates for v6.17: 2025-07-29 17:42:52 -07:00
rcu.rs
refcount.rs rust: sync: refcount: always inline functions using build_assert with arguments 2026-02-06 16:57:41 +01:00