Browse Source

ext4_journal: flush dirty buffers which have BC_TMP flag set.

pull/11/head
ngkaho1234 9 years ago
parent
commit
3cf60458bf
  1. 3
      lwext4/ext4_bcache.c

3
lwext4/ext4_bcache.c

@ -281,7 +281,8 @@ int ext4_bcache_free(struct ext4_bcache *bc, struct ext4_block *b)
if (ext4_bcache_test_flag(buf, BC_DIRTY) && if (ext4_bcache_test_flag(buf, BC_DIRTY) &&
ext4_bcache_test_flag(buf, BC_UPTODATE)) { ext4_bcache_test_flag(buf, BC_UPTODATE)) {
if (bc->bdev->cache_write_back && if (bc->bdev->cache_write_back &&
!ext4_bcache_test_flag(buf, BC_FLUSH)) !ext4_bcache_test_flag(buf, BC_FLUSH) &&
!ext4_bcache_test_flag(buf, BC_TMP))
ext4_bcache_insert_dirty_node(bc, buf); ext4_bcache_insert_dirty_node(bc, buf);
else { else {
ext4_block_flush_buf(bc->bdev, buf); ext4_block_flush_buf(bc->bdev, buf);

Loading…
Cancel
Save