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, ...@@ -232,7 +232,7 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
bh = load_block_bitmap (sb, block_group); bh = load_block_bitmap (sb, block_group);
if (IS_ERR(bh)) if (IS_ERR(bh))
goto error_return; goto error_return;
gdp = ext2_get_group_desc (sb, block_group, &bh2); gdp = ext2_get_group_desc (sb, block_group, &bh2);
if (!gdp) if (!gdp)
goto error_return; goto error_return;
...@@ -253,10 +253,8 @@ void ext2_free_blocks (struct inode * inode, unsigned long block, ...@@ -253,10 +253,8 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
ext2_error (sb, "ext2_free_blocks", ext2_error (sb, "ext2_free_blocks",
"bit already cleared for block %lu", "bit already cleared for block %lu",
block + i); block + i);
else { else
group_freed++; group_freed++;
freed++;
}
} }
mark_buffer_dirty(bh); mark_buffer_dirty(bh);
...@@ -266,6 +264,8 @@ void ext2_free_blocks (struct inode * inode, unsigned long block, ...@@ -266,6 +264,8 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
} }
group_release_blocks(gdp, bh2, group_freed); group_release_blocks(gdp, bh2, group_freed);
freed += group_freed;
if (overflow) { if (overflow) {
block += count; block += count;
count = overflow; 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