Remove left-over print statements
This commit is contained in:
parent
d6dc5bcb2d
commit
912575ad12
1 changed files with 0 additions and 6 deletions
6
bio.c
6
bio.c
|
@ -65,16 +65,12 @@ bget(uint dev, uint blockno)
|
||||||
|
|
||||||
acquire(&bcache.lock);
|
acquire(&bcache.lock);
|
||||||
|
|
||||||
// cprintf("bget %d\n", blockno);
|
|
||||||
|
|
||||||
// Is the block already cached?
|
// Is the block already cached?
|
||||||
for(b = bcache.head.next; b != &bcache.head; b = b->next){
|
for(b = bcache.head.next; b != &bcache.head; b = b->next){
|
||||||
if(b->dev == dev && b->blockno == blockno){
|
if(b->dev == dev && b->blockno == blockno){
|
||||||
//cprintf("bget %d; get sleep lock for buffer %p\n", blockno, b - bcache.buf);
|
|
||||||
b->refcnt++;
|
b->refcnt++;
|
||||||
release(&bcache.lock);
|
release(&bcache.lock);
|
||||||
acquiresleep(&b->lock);
|
acquiresleep(&b->lock);
|
||||||
//cprintf("bget: return buffer %p for blk %d\n", b - bcache.buf, blockno);
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,14 +80,12 @@ bget(uint dev, uint blockno)
|
||||||
// hasn't yet committed the changes to the buffer.
|
// hasn't yet committed the changes to the buffer.
|
||||||
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
|
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
|
||||||
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
|
if(b->refcnt == 0 && (b->flags & B_DIRTY) == 0) {
|
||||||
// cprintf("bget %d; use %p for %d\n", b - bcache.buf, blockno);
|
|
||||||
b->dev = dev;
|
b->dev = dev;
|
||||||
b->blockno = blockno;
|
b->blockno = blockno;
|
||||||
b->flags = 0;
|
b->flags = 0;
|
||||||
b->refcnt = 1;
|
b->refcnt = 1;
|
||||||
release(&bcache.lock);
|
release(&bcache.lock);
|
||||||
acquiresleep(&b->lock);
|
acquiresleep(&b->lock);
|
||||||
// cprintf("bget: return buffer %p for blk %d\n", b - bcache.buf, blockno);
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue