diff options
| author | ngkaho1234 <ngkaho1234@gmail.com> | 2016-01-11 11:58:44 +0000 |
|---|---|---|
| committer | ngkaho1234 <ngkaho1234@gmail.com> | 2016-01-11 11:58:59 +0000 |
| commit | 745c18c6062f49f83782537a06e3f5ffc04e40e1 (patch) | |
| tree | c5cf053ccdd1a60b8af97e35ac8449de16fdb15c | |
| parent | b84fde1edbeef2a5309f56dbb40b7e67f4c2ab79 (diff) | |
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.
| -rw-r--r-- | lwext4/ext4_trans.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lwext4/ext4_trans.c b/lwext4/ext4_trans.c index 2e7a528..cf9b6bf 100644 --- a/lwext4/ext4_trans.c +++ b/lwext4/ext4_trans.c @@ -108,7 +108,9 @@ int ext4_trans_try_revoke_block(struct ext4_blockdev *bdev, 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; } |
