shithub: lwext4

Download patch

ref: 3cf60458bf3372fac2b27087bdecef25fc8e6c18
parent: ea7ce7dc4a1cb5af01175324c5da8dceb3f8652d
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Wed Jan 20 21:24:09 EST 2016

ext4_journal: flush dirty buffers which have BC_TMP flag set.

--- a/lwext4/ext4_bcache.c
+++ b/lwext4/ext4_bcache.c
@@ -281,7 +281,8 @@
 		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);