diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-20 05:49:53 +0000 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2015-12-20 05:49:53 +0000 |
| commit | ad9c06e29a2dcdde75d401553879beced580ad94 (patch) | |
| tree | ac13e318567f602ebb359c2a2d558bd9d1118261 | |
| parent | 1ff612f04d8ea35ad6f9a3feeacd60d93d14c1ad (diff) | |
ext4_journal: clear end_write and end_write_arg if buffer is not dirty.
| -rw-r--r-- | lwext4/ext4_journal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lwext4/ext4_journal.c b/lwext4/ext4_journal.c index e917129..598d175 100644 --- a/lwext4/ext4_journal.c +++ b/lwext4/ext4_journal.c @@ -1121,6 +1121,8 @@ void jbd_journal_free_trans(struct jbd_journal *journal, LIST_FOREACH_SAFE(jbd_buf, &trans->buf_list, buf_node, tmp) { if (abort) { + jbd_buf->block.buf->end_write = NULL; + jbd_buf->block.buf->end_write_arg = NULL; ext4_bcache_clear_dirty(jbd_buf->block.buf); ext4_block_set(fs->bdev, &jbd_buf->block); } @@ -1190,6 +1192,8 @@ static int jbd_journal_prepare(struct jbd_journal *journal, BC_DIRTY)) { /* The buffer has not been modified, just release * that jbd_buf. */ + jbd_buf->block.buf->end_write = NULL; + jbd_buf->block.buf->end_write_arg = NULL; ext4_block_set(fs->bdev, &jbd_buf->block); LIST_REMOVE(jbd_buf, buf_node); free(jbd_buf); |
