Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: task: update ARef and AlwaysRefCounted imports from sync::aref

Update call sites in `task.rs` to import `ARef` and
`AlwaysRefCounted` from `sync::aref` instead of `types`.

This aligns with the ongoing effort to move `ARef` and
`AlwaysRefCounted` to sync.

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>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Shankari Anand and committed by
Miguel Ojeda
4710b479 72b04a8a

+4 -3
+4 -3
rust/kernel/task.rs
··· 9 9 ffi::{c_int, c_long, c_uint}, 10 10 mm::MmWithUser, 11 11 pid_namespace::PidNamespace, 12 - types::{ARef, NotThreadSafe, Opaque}, 12 + sync::aref::ARef, 13 + types::{NotThreadSafe, Opaque}, 13 14 }; 14 15 use core::{ 15 16 cmp::{Eq, PartialEq}, ··· 77 76 /// incremented when creating `State` and decremented when it is dropped: 78 77 /// 79 78 /// ``` 80 - /// use kernel::{task::Task, types::ARef}; 79 + /// use kernel::{task::Task, sync::aref::ARef}; 81 80 /// 82 81 /// struct State { 83 82 /// creator: ARef<Task>, ··· 348 347 } 349 348 350 349 // SAFETY: The type invariants guarantee that `Task` is always refcounted. 351 - unsafe impl crate::types::AlwaysRefCounted for Task { 350 + unsafe impl crate::sync::aref::AlwaysRefCounted for Task { 352 351 #[inline] 353 352 fn inc_ref(&self) { 354 353 // SAFETY: The existence of a shared reference means that the refcount is nonzero.