shithub: lwext4

Download patch

ref: 03a75d6f3bd1332a8ddaa796803b42000a6090ba
parent: 3cf7bf8bd1bc13387a957f8032f68ed0202ac6e9
author: ngkaho1234 <[email protected]>
date: Thu Dec 17 18:19:30 EST 2015

ext4_journal: mark buffers invalid if transaction is aborted.

--- a/lwext4/ext4_journal.c
+++ b/lwext4/ext4_journal.c
@@ -1116,8 +1116,10 @@
 	struct ext4_fs *fs = journal->jbd_fs->inode_ref.fs;
 	LIST_FOREACH_SAFE(jbd_buf, &trans->buf_list, buf_node,
 			  tmp) {
-		if (abort)
+		if (abort) {
+			ext4_bcache_clear_dirty(jbd_buf->block.buf);
 			ext4_block_set(fs->bdev, &jbd_buf->block);
+		}
 
 		LIST_REMOVE(jbd_buf, buf_node);
 		free(jbd_buf);