Commit f1228ed7 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (5/5) ext2_free_blocks() cleanup

minor cleanup: update 'freed' only after we finish with group
parent 4bcb2fc4
......@@ -232,7 +232,7 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
bh = load_block_bitmap (sb, block_group);
if (IS_ERR(bh))
goto error_return;
gdp = ext2_get_group_desc (sb, block_group, &bh2);
if (!gdp)
goto error_return;
......@@ -253,10 +253,8 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
ext2_error (sb, "ext2_free_blocks",
"bit already cleared for block %lu",
block + i);
else {
else
group_freed++;
freed++;
}
}
mark_buffer_dirty(bh);
......@@ -266,6 +264,8 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
}
group_release_blocks(gdp, bh2, group_freed);
freed += group_freed;
if (overflow) {
block += count;
count = overflow;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment