summaryrefslogtreecommitdiff
path: root/sys/src/9/port/fault.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@rei2.9hal>2012-02-16 18:04:08 +0100
committercinap_lenrek <cinap_lenrek@rei2.9hal>2012-02-16 18:04:08 +0100
commit77c21a062c7cf272e59df95955388f9724bff218 (patch)
treee4b119c82c995eb8dee611c64ed2320d1c0f9971 /sys/src/9/port/fault.c
parent083612b34eb152ea20b31aa5d7fbef1c11e4173e (diff)
kernel: remove duppage debug, add comments, cleanup
Diffstat (limited to 'sys/src/9/port/fault.c')
-rw-r--r--sys/src/9/port/fault.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/9/port/fault.c b/sys/src/9/port/fault.c
index b5c59d80f..7338181bc 100644
--- a/sys/src/9/port/fault.c
+++ b/sys/src/9/port/fault.c
@@ -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);