summaryrefslogtreecommitdiff
path: root/rust/kernel/mm/virt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/mm/virt.rs')
-rw-r--r--rust/kernel/mm/virt.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/rust/kernel/mm/virt.rs b/rust/kernel/mm/virt.rs
index da21d65ccd20..63eb730b0b05 100644
--- a/rust/kernel/mm/virt.rs
+++ b/rust/kernel/mm/virt.rs
@@ -113,7 +113,7 @@ impl VmaRef {
/// kernel goes further in freeing unused page tables, but for the purposes of this operation
/// we must only assume that the leaf level is cleared.
#[inline]
- pub fn zap_page_range_single(&self, address: usize, size: usize) {
+ pub fn zap_vma_range(&self, address: usize, size: usize) {
let (end, did_overflow) = address.overflowing_add(size);
if did_overflow || address < self.start() || self.end() < end {
// TODO: call WARN_ONCE once Rust version of it is added
@@ -123,9 +123,7 @@ impl VmaRef {
// SAFETY: By the type invariants, the caller has read access to this VMA, which is
// sufficient for this method call. This method has no requirements on the vma flags. The
// address range is checked to be within the vma.
- unsafe {
- bindings::zap_page_range_single(self.as_ptr(), address, size, core::ptr::null_mut())
- };
+ unsafe { bindings::zap_vma_range(self.as_ptr(), address, size) };
}
/// If the [`VM_MIXEDMAP`] flag is set, returns a [`VmaMixedMap`] to this VMA, otherwise