feat: add sanity checks to update branch of page_insert
This commit is contained in:
@@ -63,9 +63,9 @@ page_insert (struct file *file, off_t ofs, void *upage, uint32_t read_bytes,
|
||||
struct page_entry *existing = page_get (upage);
|
||||
if (existing != NULL)
|
||||
{
|
||||
existing->read_bytes = read_bytes;
|
||||
existing->zero_bytes = zero_bytes;
|
||||
existing->writable = writable;
|
||||
ASSERT (existing->read_bytes == read_bytes);
|
||||
ASSERT (existing->zero_bytes == zero_bytes);
|
||||
existing->writable = existing->writable || writable;
|
||||
return existing;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user