Skip to content

Commit b6affd4

Browse files
fix bash bug
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent ab70fb3 commit b6affd4

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

src/aero_kernel/src/mem/paging/mapper.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,6 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
569569
p2_entry.unref_vm_frame();
570570
p2_entry.set_unused();
571571

572-
let p3_entry = &mut p3[page.p3_index()];
573-
p3_entry.dec_entry_count();
574-
575-
if p3_entry.get_entry_count() == 0 {
576-
p3_entry.unref_vm_frame();
577-
p3_entry.set_unused();
578-
}
579-
580572
Ok((frame, MapperFlush::new(page)))
581573
}
582574

@@ -686,14 +678,6 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
686678
p1_entry.unref_vm_frame();
687679
p1_entry.set_unused();
688680

689-
let p2_entry = &mut p2[page.p2_index()];
690-
p2_entry.dec_entry_count();
691-
692-
if p2_entry.get_entry_count() == 0 {
693-
p2_entry.unref_vm_frame();
694-
p2_entry.set_unused();
695-
}
696-
697681
Ok((frame, MapperFlush::new(page)))
698682
}
699683

src/aero_kernel/src/mem/paging/page_table.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ impl PageTableEntry {
126126
self.set_entry_count(entry_count + 1);
127127
}
128128

129-
/// Decrements the page table entry counter by one.
130-
pub fn dec_entry_count(&mut self) {
131-
let entry_count = self.get_entry_count();
132-
assert!(entry_count != 0);
133-
134-
self.set_entry_count(entry_count - 1);
135-
}
136-
137129
/// Returns the physical frame mapped by this entry.
138130
///
139131
/// Returns the following errors:

0 commit comments

Comments
 (0)