From: Ben Gras Date: Wed, 3 Sep 2014 11:42:30 +0000 (+0200) Subject: VM: mem_shared: allow re-pagefault X-Git-Tag: v3.3.0~23 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=4f9ef4d3b0f3b509714ab3def0369ac00f10b7c3;p=minix.git VM: mem_shared: allow re-pagefault Change-Id: Iffd0e265c03f064545c9689ac204c58335d32c9a --- diff --git a/minix/servers/vm/mem_shared.c b/minix/servers/vm/mem_shared.c index d51029111..93e791dc4 100644 --- a/minix/servers/vm/mem_shared.c +++ b/minix/servers/vm/mem_shared.c @@ -131,7 +131,11 @@ static int shared_pagefault(struct vmproc *vmp, struct vir_region *region, return EINVAL; } - assert(ph->ph->phys == MAP_NONE); + if(ph->ph->phys != MAP_NONE) { + /* memory is there - pagefault does not need handling */ + return OK; + } + pb_free(ph->ph); if(!(pr = physblock_get(src_region, ph->offset))) {