summaryrefslogtreecommitdiff
path: root/bio.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2014-08-28 16:13:58 -0400
committerRobert Morris <[email protected]>2014-08-28 16:13:58 -0400
commit8d618cab78c91e4936bade94e9dcbf8fb54fbb19 (patch)
tree06dc3e1ea0d4d695b25051e90c96c89cc31c3b48 /bio.c
parent12eeefc72dc31211c5f54ea64e21c8a5668f92d7 (diff)
parent2b2c1971fc2c3cc6fa1f2f3e7b507a3a35a0cbb8 (diff)
downloadxv6-labs-8d618cab78c91e4936bade94e9dcbf8fb54fbb19.tar.gz
xv6-labs-8d618cab78c91e4936bade94e9dcbf8fb54fbb19.tar.bz2
xv6-labs-8d618cab78c91e4936bade94e9dcbf8fb54fbb19.zip
Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6
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;