kernel: remove duppage debug, add comments, cleanup
This commit is contained in:
parent
083612b34e
commit
77c21a062c
3 changed files with 17 additions and 25 deletions
|
@ -140,8 +140,8 @@ fixfault(Segment *s, ulong addr, int read, int doputmmu)
|
|||
|
||||
lkp = *pg;
|
||||
lock(lkp);
|
||||
if(lkp->ref <= 0)
|
||||
panic("fault: lkp->ref %d <= 0", lkp->ref);
|
||||
if(lkp->ref < 1)
|
||||
panic("fault: lkp->ref %d < 1", lkp->ref);
|
||||
if(lkp->image == &swapimage)
|
||||
ref = lkp->ref + swapcount(lkp->daddr);
|
||||
else
|
||||
|
@ -149,7 +149,6 @@ fixfault(Segment *s, ulong addr, int read, int doputmmu)
|
|||
if(ref == 1 && lkp->image){
|
||||
/* save a copy of the original for the image cache */
|
||||
duppage(lkp);
|
||||
|
||||
ref = lkp->ref;
|
||||
}
|
||||
unlock(lkp);
|
||||
|
@ -246,7 +245,7 @@ retry:
|
|||
}
|
||||
n = devtab[c->type]->read(c, kaddr, ask, daddr);
|
||||
if(n != ask)
|
||||
faulterror(Eioload, c, 0);
|
||||
error(Eioload);
|
||||
if(ask < BY2PG)
|
||||
memset(kaddr+ask, 0, BY2PG-ask);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue