]> Gentwo Git Trees - linux/.git/commit
rust: page: implement BorrowedPage
authorDanilo Krummrich <dakr@kernel.org>
Wed, 20 Aug 2025 14:53:37 +0000 (16:53 +0200)
committerDanilo Krummrich <dakr@kernel.org>
Thu, 4 Sep 2025 16:21:09 +0000 (18:21 +0200)
commit467971a908761540cc60b4da22639c440dc05462
tree6e7cf8c9ef90908fae8d867a1c0816839e2ffa3c
parent93296e9d9528f0d87f2cf3fee494599060a0f14a
rust: page: implement BorrowedPage

Currently, a Page always owns the underlying struct page.

However, sometimes a struct page may be owned by some other entity, e.g.
a vmalloc allocation.

Hence, introduce BorrowedPage to support such cases, until the Ownable
solution [1] lands.

This is required by the scatterlist abstractions.

Acked-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://lore.kernel.org/rust-for-linux/ZnCzLIly3DRK2eab@boqun-archlinux/
Link: https://lore.kernel.org/r/20250820145434.94745-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/bindings/bindings_helper.h
rust/kernel/page.rs