Skip to content
Commit f94fc527 authored by Josef Bacik's avatar Josef Bacik Committed by Andy Whitcroft
Browse files

ext4: wait for log to commit when umounting

(cherry picked from commit d4edac31

)

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: default avatarJosef Bacik <josef@redhat.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent 6278b864
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