Browse Source

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.
pull/11/head
ngkaho1234 9 years ago
parent
commit
745c18c606
  1. 4
      lwext4/ext4_trans.c

4
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;
}

Loading…
Cancel
Save