summaryrefslogtreecommitdiff
path: root/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'bio.c')
-rw-r--r--bio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bio.c b/bio.c
index a6cefc8..916968d 100644
--- a/bio.c
+++ b/bio.c
@@ -80,6 +80,8 @@ bget(uint dev, uint sector)
}
// Not cached; recycle some non-busy and clean buffer.
+ // "clean" because B_DIRTY and !B_BUSY means log.c
+ // hasn't yet committed the changes to the buffer.
for(b = bcache.head.prev; b != &bcache.head; b = b->prev){
if((b->flags & B_BUSY) == 0 && (b->flags & B_DIRTY) == 0){
b->dev = dev;