]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: wait for log to commit when umounting
authorJosef Bacik <josef@redhat.com>
Wed, 9 Dec 2009 02:48:58 +0000 (21:48 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:07:52 +0000 (08:07 -0800)
commit3b9d4e773c20b34534c46e563103071f2f540bf8
tree65b9899c9f534b4a440fe8c43b01fa5e9a769fe2
parent1065591da0c1726f0aff654a7e23062e8898d923
ext4: wait for log to commit when umounting

(cherry picked from commit d4edac314e9ad0b21ba20ba8bc61b61f186f79e1)

There is a potential race when a transaction is committing right when
the file system is being umounting.  This could reduce in a race
because EXT4_SB(sb)->s_group_info could be freed in ext4_put_super
before the commit code calls a callback so the mballoc code can
release freed blocks in the transaction, resulting in a panic trying
to access the freed s_group_info.

The fix is to wait for the transaction to finish committing before we
shutdown the multiblock allocator.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/super.c