From ed7bc1dbf029c85dac08669af9b0314f196087c5 Mon Sep 17 00:00:00 2001 From: Yifan Wu Date: Sun, 30 Jun 2024 20:09:43 +0800 Subject: [PATCH] mm: bugfix #133: MapArea::copy_data does not need &mut PageTable --- os/src/mm/memory_set.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/src/mm/memory_set.rs b/os/src/mm/memory_set.rs index 7cdd394a9..10e164a7e 100644 --- a/os/src/mm/memory_set.rs +++ b/os/src/mm/memory_set.rs @@ -316,7 +316,7 @@ impl MapArea { } /// data: start-aligned but maybe with shorter length /// assume that all frames were cleared before - pub fn copy_data(&mut self, page_table: &mut PageTable, data: &[u8]) { + pub fn copy_data(&mut self, page_table: &PageTable, data: &[u8]) { assert_eq!(self.map_type, MapType::Framed); let mut start: usize = 0; let mut current_vpn = self.vpn_range.get_start();