]> git.baikalelectronics.ru Git - kernel.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)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 9 Dec 2009 02:48:58 +0000 (21:48 -0500)
commit5114bcba9a610e3a1a4a10d8bcb979e9a93350d4
treeaf44b291976308b9db6c215cb2dc03bbe020d6fc
parent3f5780e5ec8c172bd9760768ebadb3e0ab42d613
ext4: wait for log to commit when umounting

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>
fs/ext4/super.c