Commit cc18ae86 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c8e9e128
...@@ -941,9 +941,6 @@ static int __ram_reclaim(RAM *ram) ...@@ -941,9 +941,6 @@ static int __ram_reclaim(RAM *ram)
/* delete page & its entry in fileh->pagemap */ /* delete page & its entry in fileh->pagemap */
pagemap_del(&page->fileh->pagemap, page->f_pgoffset); pagemap_del(&page->fileh->pagemap, page->f_pgoffset);
page_del(page); page_del(page);
// list_del(&page->lru);
// bzero(page, sizeof(*page)); /* just in case */
// free(page);
} }
} }
...@@ -1035,7 +1032,7 @@ static void page_drop_memory(Page *page) ...@@ -1035,7 +1032,7 @@ static void page_drop_memory(Page *page)
*/ */
static void page_del(Page *page) { static void page_del(Page *page) {
BUG_ON(page->refcnt != 0); BUG_ON(page->refcnt != 0);
BUG_ON(page->state == PAGE_DIRTY); // XXX + PAGE_LOADING ? BUG_ON(page->state == PAGE_DIRTY); // XXX + PAGE_LOADING ? XXX != PAGE_EMPTY ?
list_del(&page->lru); list_del(&page->lru);
bzero(page, sizeof(*page)); /* just in case */ bzero(page, sizeof(*page)); /* just in case */
...@@ -1076,6 +1073,7 @@ static void vma_mmap_page(VMA *vma, Page *page) { ...@@ -1076,6 +1073,7 @@ static void vma_mmap_page(VMA *vma, Page *page) {
pgoff_t pgoff_invma; pgoff_t pgoff_invma;
int prot = (page->state == PAGE_DIRTY ? PROT_READ|PROT_WRITE : PROT_READ); int prot = (page->state == PAGE_DIRTY ? PROT_READ|PROT_WRITE : PROT_READ);
// NOTE: PAGE_LOADED_FOR_WRITE not passed here
ASSERT(page->state == PAGE_LOADED || page->state == PAGE_DIRTY); ASSERT(page->state == PAGE_LOADED || page->state == PAGE_DIRTY);
ASSERT(vma->f_pgoffset <= page->f_pgoffset && ASSERT(vma->f_pgoffset <= page->f_pgoffset &&
page->f_pgoffset < vma_addr_fpgoffset(vma, vma->addr_stop)); page->f_pgoffset < vma_addr_fpgoffset(vma, vma->addr_stop));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment