Re: [PATCH v4] rust: move ARef and AlwaysRefCounted to sync::aref

From: Miguel Ojeda
Date: Tue Jul 22 2025 - 07:55:39 EST


On Tue, Jul 15, 2025 at 1:04 PM Shankari Anand
<shankari.ak0208@xxxxxxxxx> wrote:
>
> Move the definitions of `ARef` and `AlwaysRefCounted` from `types.rs`
> to a new file `sync/aref.rs`.
> Define the corresponding `aref` module under `rust/kernel/sync.rs`.
> These types are better grouped in `sync`.
>
> To avoid breaking existing imports, they are re-exported from `types.rs`.
> Drop unused imports `mem::ManuallyDrop`, `ptr::NonNull` from `types.rs`,
> they are now only used in `sync/aref.rs`, where they are already imported.
>
> Suggested-by: Benno Lossin <lossin@xxxxxxxxxx>
> Link: https://github.com/Rust-for-Linux/linux/issues/1173
> Signed-off-by: Shankari Anand <shankari.ak0208@xxxxxxxxx>

Applied to `rust-next` -- thanks everyone!

[ Added missing `///`. Changed module title. Reworded slightly. - Miguel ]

Cheers,
Miguel