Re: [PATCH v18 4/8] rust: page: convert to `Ownable`

From: Gary Guo

Date: Thu Jun 25 2026 - 09:32:31 EST


On Thu Jun 25, 2026 at 11:15 AM BST, Andreas Hindborg wrote:
> From: Asahi Lina <lina@xxxxxxxxxxxxx>
>
> This allows Page references to be returned as borrowed references,
> without necessarily owning the struct page.
>
> Remove `BorrowedPage` and update users to use `Owned<Page>`.
>
> Signed-off-by: Asahi Lina <lina@xxxxxxxxxxxxx>
> [ Andreas: Fix formatting and add a safety comment, update users. ]
> Signed-off-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>

Nice to see `BorrowedPage` going away.

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> drivers/android/binder/page_range.rs | 10 +--
> rust/kernel/alloc/allocator.rs | 19 +++---
> rust/kernel/alloc/allocator/iter.rs | 6 +-
> rust/kernel/page.rs | 122 +++++++++--------------------------
> 4 files changed, 46 insertions(+), 111 deletions(-)