ANDROID: rust_binder: rename VmAreaNew->VmaNew
We landed the MM series as FROMLIST, and in the version of the series that landed upstream the VmAreaNew type had been renamed to VmaNew. Thus, update the naming in Rust Binder. Bug: 429146594 Change-Id: I244decf4fa7e0ee9077a5f1a2a82f409eccde290 Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This commit is contained in:
@@ -282,7 +282,7 @@ impl ShrinkablePageRange {
|
||||
}
|
||||
|
||||
/// Register a vma with this page range. Returns the size of the region.
|
||||
pub(crate) fn register_with_vma(&self, vma: &virt::VmAreaNew) -> Result<usize> {
|
||||
pub(crate) fn register_with_vma(&self, vma: &virt::VmaNew) -> Result<usize> {
|
||||
let num_bytes = usize::min(vma.end() - vma.start(), bindings::SZ_4M as usize);
|
||||
let num_pages = num_bytes >> PAGE_SHIFT;
|
||||
|
||||
|
||||
@@ -1069,7 +1069,7 @@ impl Process {
|
||||
}
|
||||
}
|
||||
|
||||
fn create_mapping(&self, vma: &mm::virt::VmAreaNew) -> Result {
|
||||
fn create_mapping(&self, vma: &mm::virt::VmaNew) -> Result {
|
||||
use kernel::page::PAGE_SIZE;
|
||||
let size = usize::min(vma.end() - vma.start(), bindings::SZ_4M as usize);
|
||||
let mapping = Mapping::new(vma.start(), size);
|
||||
@@ -1622,7 +1622,7 @@ impl Process {
|
||||
pub(crate) fn mmap(
|
||||
this: ArcBorrow<'_, Process>,
|
||||
_file: &File,
|
||||
vma: &mm::virt::VmAreaNew,
|
||||
vma: &mm::virt::VmaNew,
|
||||
) -> Result {
|
||||
// We don't allow mmap to be used in a different process.
|
||||
if !core::ptr::eq(kernel::current!().group_leader(), &*this.task) {
|
||||
|
||||
@@ -455,7 +455,7 @@ unsafe extern "C" fn rust_binder_mmap(
|
||||
// SAFETY: We previously set `private_data` in `rust_binder_open`.
|
||||
let f = unsafe { Arc::<Process>::borrow((*file).private_data) };
|
||||
// SAFETY: The caller ensures that the vma is valid.
|
||||
let area = unsafe { kernel::mm::virt::VmAreaNew::from_raw(vma) };
|
||||
let area = unsafe { kernel::mm::virt::VmaNew::from_raw(vma) };
|
||||
// SAFETY: The caller ensures that the file is valid.
|
||||
match Process::mmap(f, unsafe { File::from_raw_file(file) }, area) {
|
||||
Ok(()) => 0,
|
||||
|
||||
Reference in New Issue
Block a user