]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust: block: update ARef and AlwaysRefCounted imports from sync::aref
authorShankari Anand <shankari.ak0208@gmail.com>
Sun, 12 Oct 2025 14:20:12 +0000 (19:50 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Nov 2025 01:24:10 +0000 (18:24 -0700)
Update call sites in the block subsystem 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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnull/rnull.rs
rust/kernel/block/mq.rs
rust/kernel/block/mq/operations.rs
rust/kernel/block/mq/request.rs

index 1ec694d7f1a66268e75c29ce32305b9205cbd2d4..a9d5e575a2c43ec3ba9efa4890f810646fd01671 100644 (file)
@@ -17,8 +17,7 @@ use kernel::{
     error::Result,
     pr_info,
     prelude::*,
-    sync::Arc,
-    types::ARef,
+    sync::{aref::ARef, Arc},
 };
 use pin_init::PinInit;
 
index 637018ead0abcae176c76a2d6354ebd61398c1b2..1fd0d54dd549324ca8bfba8a1c520fbc61668a34 100644 (file)
@@ -20,7 +20,7 @@
 //! The kernel will interface with the block device driver by calling the method
 //! implementations of the `Operations` trait.
 //!
-//! IO requests are passed to the driver as [`kernel::types::ARef<Request>`]
+//! IO requests are passed to the driver as [`kernel::sync::aref::ARef<Request>`]
 //! instances. The `Request` type is a wrapper around the C `struct request`.
 //! The driver must mark end of processing by calling one of the
 //! `Request::end`, methods. Failure to do so can lead to deadlock or timeout
@@ -61,8 +61,7 @@
 //!     block::mq::*,
 //!     new_mutex,
 //!     prelude::*,
-//!     sync::{Arc, Mutex},
-//!     types::{ARef, ForeignOwnable},
+//!     sync::{aref::ARef, Arc, Mutex},
 //! };
 //!
 //! struct MyBlkDevice;
index f91a1719886c124dd69b835b1dab1ac9d148fb0b..8ad46129a52c4ff75dedb643f8602b0679c86231 100644 (file)
@@ -9,8 +9,8 @@ use crate::{
     block::mq::{request::RequestDataWrapper, Request},
     error::{from_result, Result},
     prelude::*,
-    sync::Refcount,
-    types::{ARef, ForeignOwnable},
+    sync::{aref::ARef, Refcount},
+    types::ForeignOwnable,
 };
 use core::marker::PhantomData;
 
index c5f1f6b1ccfbcda7f5f4cdfb8942e3910a38b6ed..ce3e30c81cb5ed73a40eff3eb30663727b7c9c08 100644 (file)
@@ -8,8 +8,12 @@ use crate::{
     bindings,
     block::mq::Operations,
     error::Result,
-    sync::{atomic::Relaxed, Refcount},
-    types::{ARef, AlwaysRefCounted, Opaque},
+    sync::{
+        aref::{ARef, AlwaysRefCounted},
+        atomic::Relaxed,
+        Refcount,
+    },
+    types::Opaque,
 };
 use core::{marker::PhantomData, ptr::NonNull};