From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 29 Feb 2012 20:50:35 +0100 From: cinap_lenrek@gmx.de To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] duppage Topicbox-Message-UUID: 65d72284-ead7-11e9-9d60-3106f5b1d025 fixfault() in fault.c is the only user of duppage(). in 9front, i changed the return type of duppage to void. fixfault() now looks like this: ... if(lkp->image == &swapimage) ref = lkp->ref + swapcount(lkp->daddr); else ref = lkp->ref; if(ref == 1 && lkp->image){ /* save a copy of the original for the image cache */ duppage(lkp); ref = lkp->ref; } unlock(lkp); if(ref > 1){ new = newpage(0, &s, addr); if(s == 0) return -1; *pg = new; copypage(lkp, *pg); putpage(lkp); } ... -- cinap