diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2025-08-20 16:53:37 +0200 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-09-04 18:21:09 +0200 |
| commit | 467971a908761540cc60b4da22639c440dc05462 (patch) | |
| tree | 6e7cf8c9ef90908fae8d867a1c0816839e2ffa3c /rust/bindings/bindings_helper.h | |
| parent | 93296e9d9528f0d87f2cf3fee494599060a0f14a (diff) | |
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/ [1]
Link: https://lore.kernel.org/r/20250820145434.94745-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/bindings/bindings_helper.h')
| -rw-r--r-- | rust/bindings/bindings_helper.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index 84d60635e8a9..0e140e07758b 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -57,6 +57,7 @@ #include <linux/jiffies.h> #include <linux/jump_label.h> #include <linux/mdio.h> +#include <linux/mm.h> #include <linux/miscdevice.h> #include <linux/of_device.h> #include <linux/pci.h> |