summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorngkaho1234 <ngkaho1234@gmail.com>2016-01-21 02:24:09 +0000
committerngkaho1234 <ngkaho1234@gmail.com>2016-01-21 13:01:13 +0000
commit3cf60458bf3372fac2b27087bdecef25fc8e6c18 (patch)
tree1c36c98cd6858fa9cb81aa2a61d83cb2676ea28b
parentea7ce7dc4a1cb5af01175324c5da8dceb3f8652d (diff)
ext4_journal: flush dirty buffers which have BC_TMP flag set.
-rw-r--r--lwext4/ext4_bcache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lwext4/ext4_bcache.c b/lwext4/ext4_bcache.c
index 3688346..4a8d44a 100644
--- a/lwext4/ext4_bcache.c
+++ b/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) &&
ext4_bcache_test_flag(buf, BC_UPTODATE)) {
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);
else {
ext4_block_flush_buf(bc->bdev, buf);