ref: faea10c2b5a7390927944caa7d9cd72dc9162860
parent: 4253692dd49156b401ad347568469bbcb0e006e0
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sat Dec 19 06:25:25 EST 2015
ext4_journal: make trans the argument passing to jbd_trans_end_write.
--- a/lwext4/ext4_journal.c
+++ b/lwext4/ext4_journal.c
@@ -1073,7 +1073,7 @@
/* If the content reach the disk, notify us
* so that we may do a checkpoint. */
block->buf->end_write = jbd_trans_end_write;
- block->buf->end_write_arg = trans;
+ block->buf->end_write_arg = buf;
trans->data_cnt++;
LIST_INSERT_HEAD(&trans->buf_list, buf, buf_node);
@@ -1363,7 +1363,8 @@
int res,
void *arg)
{
- struct jbd_trans *trans = arg;
+ struct jbd_buf *jbd_buf = arg;
+ struct jbd_trans *trans = jbd_buf->trans;
struct jbd_journal *journal = trans->journal;
bool first_in_queue =
trans == TAILQ_FIRST(&journal->cp_queue);