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);
|
struct page_entry *existing = page_get (upage);
|
||||||
if (existing != NULL)
|
if (existing != NULL)
|
||||||
{
|
{
|
||||||
existing->read_bytes = read_bytes;
|
ASSERT (existing->read_bytes == read_bytes);
|
||||||
existing->zero_bytes = zero_bytes;
|
ASSERT (existing->zero_bytes == zero_bytes);
|
||||||
existing->writable = writable;
|
existing->writable = existing->writable || writable;
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user