ANDROID: ashmem: 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: Iab7761c76a0cda1c231d28e24a5fec28134be16a Signed-off-by: Alice Ryhl <aliceryhl@google.com>
This commit is contained in:
@@ -22,7 +22,7 @@ use kernel::{
|
||||
fs::{File, LocalFile},
|
||||
ioctl::_IOC_SIZE,
|
||||
miscdevice::{loff_t, IovIter, Kiocb, MiscDevice, MiscDeviceOptions, MiscDeviceRegistration},
|
||||
mm::virt::{flags as vma_flags, VmAreaNew},
|
||||
mm::virt::{flags as vma_flags, VmaNew},
|
||||
page::{page_align, PAGE_MASK, PAGE_SIZE},
|
||||
page_size_compat::__page_align,
|
||||
prelude::*,
|
||||
@@ -155,7 +155,7 @@ impl MiscDevice for Ashmem {
|
||||
)
|
||||
}
|
||||
|
||||
fn mmap(me: Pin<&Ashmem>, _file: &File, vma: &VmAreaNew) -> Result<()> {
|
||||
fn mmap(me: Pin<&Ashmem>, _file: &File, vma: &VmaNew) -> Result<()> {
|
||||
let asma = &mut *me.inner.lock();
|
||||
|
||||
// User needs to SET_SIZE before mapping.
|
||||
|
||||
@@ -10,7 +10,7 @@ use kernel::{
|
||||
ffi::{c_int, c_ulong},
|
||||
fs::file::{File, LocalFile},
|
||||
miscdevice::{loff_t, IovIter},
|
||||
mm::virt::{vm_flags_t, VmAreaNew},
|
||||
mm::virt::{vm_flags_t, VmaNew},
|
||||
prelude::*,
|
||||
str::CStr,
|
||||
types::ARef,
|
||||
@@ -37,8 +37,8 @@ pub(crate) unsafe fn file_set_fpos(file: &LocalFile, pos: loff_t) {
|
||||
unsafe { (*file.as_ptr()).f_pos = pos };
|
||||
}
|
||||
|
||||
pub(crate) fn vma_set_anonymous(vma: &VmAreaNew) {
|
||||
// SAFETY: The `VmAreaNew` type is only used when the vma is being set up, so this operation is
|
||||
pub(crate) fn vma_set_anonymous(vma: &VmaNew) {
|
||||
// SAFETY: The `VmaNew` type is only used when the vma is being set up, so this operation is
|
||||
// safe.
|
||||
unsafe { (*vma.as_ptr()).vm_ops = core::ptr::null_mut() };
|
||||
}
|
||||
@@ -152,13 +152,13 @@ fn set_inode_lockdep_class(vmfile: &File) {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn zero_setup(vma: &VmAreaNew) -> Result<()> {
|
||||
// SAFETY: The `VmAreaNew` type is only used when the vma is being set up, so we can set up the
|
||||
pub(crate) fn zero_setup(vma: &VmaNew) -> Result<()> {
|
||||
// SAFETY: The `VmaNew` type is only used when the vma is being set up, so we can set up the
|
||||
// vma.
|
||||
to_result(unsafe { bindings::shmem_zero_setup(vma.as_ptr()) })
|
||||
}
|
||||
|
||||
pub(crate) fn set_file(vma: &VmAreaNew, file: &File) {
|
||||
pub(crate) fn set_file(vma: &VmaNew, file: &File) {
|
||||
let file = ARef::from(file);
|
||||
// SAFETY: We're setting up the vma, so we can read the file pointer.
|
||||
let old_file = unsafe { (*vma.as_ptr()).vm_file };
|
||||
|
||||
Reference in New Issue
Block a user