shithub: lwext4

Download patch

ref: 5cf3ed9bc1a227e6dac367d6b9408d81f972af67
parent: c2a546d91ac5431bc65e994006e42ec2684ef91f
author: ngkaho1234 <[email protected]>
date: Tue Dec 29 19:08:58 EST 2015

ext4_journal: fix trans->data_cnt not be decremented

When buffer is not dirty this counter should be decremented.

--- a/lwext4/ext4_journal.c
+++ b/lwext4/ext4_journal.c
@@ -1365,6 +1365,9 @@
 					   BC_DIRTY)) {
 			/* The buffer has not been modified, just release
 			 * that jbd_buf. */
+			jbd_trans_remove_block_rec(journal, jbd_buf);
+			trans->data_cnt--;
+
 			jbd_buf->block.buf->end_write = NULL;
 			jbd_buf->block.buf->end_write_arg = NULL;
 			ext4_block_set(fs->bdev, &jbd_buf->block);