do_mmap(): simplify demand paging flags; avoid zeroobj and allocate pages directly

This commit is contained in:
Balazs Gerofi
2016-08-17 14:00:05 +09:00
parent 1a207e19c2
commit 9efd568e07
2 changed files with 8 additions and 11 deletions

View File

@@ -172,6 +172,10 @@ static int zeroobj_get_page(struct memobj *memobj, off_t off, int p2align,
struct zeroobj *obj = to_zeroobj(memobj);
struct page *page;
/* Don't bother about zero page, page fault handler will
* allocate and clear pages */
return 0;
dkprintf("zeroobj_get_page(%p,%#lx,%d,%p)\n",
memobj, off, p2align, physp);
if (off & ~PAGE_MASK) {