[PATCH v7] rust: aref: make `AlwaysRefCounted::inc_ref` an associated function
Andreas Hindborg
a.hindborg at kernel.org
Wed Aug 5 18:29:21 UTC 2026
"Trevor Chan" <trev at trevrosa.dev> writes:
> `AlwaysRefCounted::inc_ref` is a function that shouldn't be called lightly.
>
> To prevent accidentally calling it, change `inc_ref` to be an associated function.
>
> Modify all `AlwaysRefCounted` implementors to work with this change.
>
> Suggested-by: Benno Lossin <lossin at kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1177
> Reviewed-by: Alice Ryhl <aliceryhl at google.com>
> Signed-off-by: Trevor Chan <trev at trevrosa.dev>
Reviewed-by: Andreas Hindborg <a.hindborg at kernel.org>
Best regards,
Andreas Hindborg
More information about the Linux-security-module-archive
mailing list