shithub: lwext4

Download patch

ref: 29d9896af914e4a058de154920ce55eb6371de93
parent: 1fcbe7f294d68c54752ab7a255a62a8dddd0b6a7
author: ngkaho1234 <[email protected]>
date: Tue Nov 24 10:09:23 EST 2015

ext4_bcache: clear BC_DIRTY flag when buffer will be dropped.

--- a/lwext4/ext4_bcache.c
+++ b/lwext4/ext4_bcache.c
@@ -246,8 +246,10 @@
 		b->uptodate = true;
 	}
 	/* Someone might want to drop this buffer from bcache. */
-	if (!b->uptodate)
+	if (!b->uptodate) {
+		ext4_bcache_clear_flag(buf, BC_DIRTY);
 		ext4_bcache_clear_flag(buf, BC_UPTODATE);
+	}
 
 	/* We are the last one touching this buffer, do the cleanups. */
 	if (!buf->refctr) {