mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
gefs: getblk(): remove duplicate getcallerpc(), check b->bp.gen from cache
This commit is contained in:
parent
66d2e1ac59
commit
c91fd35518
1 changed files with 7 additions and 10 deletions
|
@ -735,18 +735,15 @@ getblk(Bptr bp, int flg)
|
|||
}
|
||||
if((b = cacheget(bp.addr)) != nil){
|
||||
assert(checkflag(b, 0, Bfreed));
|
||||
b->lasthold = getcallerpc(&bp);
|
||||
qunlock(&fs->blklk[i]);
|
||||
poperror();
|
||||
return b;
|
||||
}
|
||||
assert(b->bp.gen == bp.gen);
|
||||
} else {
|
||||
b = cachepluck();
|
||||
b->alloced = getcallerpc(&bp);
|
||||
b->alloced = getcallerpc(&bp);
|
||||
readblk(b, bp, flg);
|
||||
b->bp.gen = bp.gen;
|
||||
b->lasthold = getcallerpc(&bp);
|
||||
cacheins(b);
|
||||
}
|
||||
b->lasthold = getcallerpc(&bp);
|
||||
qunlock(&fs->blklk[i]);
|
||||
poperror();
|
||||
|
||||
|
|
Loading…
Reference in a new issue