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: block: update ARef and AlwaysRefCounted imports from sync::aref

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>

authored by

Shankari Anand and committed by
Jens Axboe
ba13710d 55de535e

+11 -9
+1 -2
drivers/block/rnull/rnull.rs
··· 17 17 error::Result, 18 18 pr_info, 19 19 prelude::*, 20 - sync::Arc, 21 - types::ARef, 20 + sync::{aref::ARef, Arc}, 22 21 }; 23 22 use pin_init::PinInit; 24 23
+2 -3
rust/kernel/block/mq.rs
··· 20 20 //! The kernel will interface with the block device driver by calling the method 21 21 //! implementations of the `Operations` trait. 22 22 //! 23 - //! IO requests are passed to the driver as [`kernel::types::ARef<Request>`] 23 + //! IO requests are passed to the driver as [`kernel::sync::aref::ARef<Request>`] 24 24 //! instances. The `Request` type is a wrapper around the C `struct request`. 25 25 //! The driver must mark end of processing by calling one of the 26 26 //! `Request::end`, methods. Failure to do so can lead to deadlock or timeout ··· 61 61 //! block::mq::*, 62 62 //! new_mutex, 63 63 //! prelude::*, 64 - //! sync::{Arc, Mutex}, 65 - //! types::{ARef, ForeignOwnable}, 64 + //! sync::{aref::ARef, Arc, Mutex}, 66 65 //! }; 67 66 //! 68 67 //! struct MyBlkDevice;
+2 -2
rust/kernel/block/mq/operations.rs
··· 9 9 block::mq::{request::RequestDataWrapper, Request}, 10 10 error::{from_result, Result}, 11 11 prelude::*, 12 - sync::Refcount, 13 - types::{ARef, ForeignOwnable}, 12 + sync::{aref::ARef, Refcount}, 13 + types::ForeignOwnable, 14 14 }; 15 15 use core::marker::PhantomData; 16 16
+6 -2
rust/kernel/block/mq/request.rs
··· 8 8 bindings, 9 9 block::mq::Operations, 10 10 error::Result, 11 - sync::{atomic::Relaxed, Refcount}, 12 - types::{ARef, AlwaysRefCounted, Opaque}, 11 + sync::{ 12 + aref::{ARef, AlwaysRefCounted}, 13 + atomic::Relaxed, 14 + Refcount, 15 + }, 16 + types::Opaque, 13 17 }; 14 18 use core::{marker::PhantomData, ptr::NonNull}; 15 19