ext4: simplify journal handling in setup_new_group_blocks()
authorYongqiang Yang <xiaoqiangnk@gmail.com>
Wed, 27 Jul 2011 02:24:41 +0000 (22:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 27 Jul 2011 02:24:41 +0000 (22:24 -0400)
commit6d40bc5a7e8fc71795d131e835f38f161ed7e1b1
treed66d509a10509bc09d8dc0ecdc4641b585c1bfa0
parentc3e94d1df9bdd9e2c4ba7e8f534f7925f1756f97
ext4: simplify journal handling in setup_new_group_blocks()

This patch simplifies journal handling in setup_new_group_blocks().

In previous code, block bitmap is modified everywhere in
setup_new_group_blocks(), ext4_get_write_access() in
extend_or_restart_transaction() is used to guarantee that the block
bitmap stays in the new handle, this makes things complicated.

The previous commit changed things so that the modifications on the
block bitmap are batched and done by ext4_set_bits() at the end of the
for loop.  This allows us to simplify things.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/resize.c