]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: kernel: move ARef and AlwaysRefCounted to sync::aref
authorShankari Anand <shankari.ak0208@gmail.com>
Tue, 15 Jul 2025 11:04:23 +0000 (16:34 +0530)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 22 Jul 2025 11:52:14 +0000 (13:52 +0200)
commit07dad44aa9a93b16af19e8609a10b241c352b440
tree70efc7595a7064c254f215b95207e0598a12c43b
parent4e6b5b8ab3e28148d04a63defadc29cfc771b102
rust: kernel: move ARef and AlwaysRefCounted to sync::aref

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@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1173
Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250715110423.334744-1-shankari.ak0208@gmail.com
[ Added missing `///`. Changed module title. Reworded slightly. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/sync.rs
rust/kernel/sync/aref.rs [new file with mode: 0644]
rust/kernel/types.rs