shithub: lwext4

Download patch

ref: fbc87b38d6c36aeec6bae1c67752e1f059953f20
parent: 2357dfc97f58c458e110b239b5d147996864ecb5
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Mon Dec 28 08:13:42 EST 2015

ext4_bcache: remove buffer from dirty list when it is invalidated.

--- a/lwext4/ext4_bcache.c
+++ b/lwext4/ext4_bcache.c
@@ -187,6 +187,9 @@
 			break;
 
 		/* Clear both dirty and up-to-date flags. */
+		if (ext4_bcache_test_flag(buf, BC_DIRTY))
+			ext4_bcache_remove_dirty_node(bc, buf);
+
 		ext4_bcache_clear_dirty(buf);
 	}
 }