ref: 9dc5fd9ed3705ab5ff9244ae77cb57598074aee5
parent: af5034292e3db3d9db5f31479185ef65f8a1cf9a
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sat Apr 23 21:05:26 EDT 2016
ext4_balloc: fix not revoking any blocks when freeing blocks.
--- a/src/ext4_balloc.c
+++ b/src/ext4_balloc.c
@@ -232,6 +232,7 @@
ext4_fsblk_t first, uint32_t count)
{
int rc = EOK;
+ uint32_t blk_cnt = count;
struct ext4_fs *fs = inode_ref->fs;
struct ext4_sblock *sb = &fs->sb;
@@ -331,7 +332,7 @@
}
uint32_t i;
- for (i = 0;i < count;i++) {
+ for (i = 0;i < blk_cnt;i++) {
rc = ext4_trans_try_revoke_block(fs->bdev, first + i);
if (rc != EOK)
return rc;