shithub: lwext4

Download patch

ref: 745c18c6062f49f83782537a06e3f5ffc04e40e1
parent: b84fde1edbeef2a5309f56dbb40b7e67f4c2ab79
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Mon Jan 11 06:58:44 EST 2016

ext4_trans: flush the buffer in the following case.

When we are not running a transaction, but have enabled journalling,
we should flush the buffer when we free the corresponding block.

--- a/lwext4/ext4_trans.c
+++ b/lwext4/ext4_trans.c
@@ -108,7 +108,9 @@
 	if (fs->jbd_journal && fs->curr_trans) {
 		struct jbd_trans *trans = fs->curr_trans;
 		r = jbd_trans_try_revoke_block(trans, lba);
-	}
+	} else if (fs->jbd_journal)
+		r = ext4_block_flush_lba(fs->bdev, lba);
+
 	return r;
 }