]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: don't call ext4_error while block group is locked
authorTheodore Ts'o <tytso@mit.edu>
Fri, 10 Aug 2012 17:57:52 +0000 (13:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Aug 2012 02:31:42 +0000 (19:31 -0700)
commite05ea717652a0ce1a2cf8729535ac90c5aee6734
tree8773ae61b1f90c55eb676e27508bc585403f1ff2
parentdfceb2c4729c987c7c2956158c2d2dc35fa33e0e
ext4: don't call ext4_error while block group is locked

commit 7a4c5de27efa4c2ecca87af0a3deea63446367e2 upstream.

While in ext4_validate_block_bitmap(), if an block allocation bitmap
is found to be invalid, we call ext4_error() while the block group is
still locked.  This causes ext4_commit_super() to call a function
which might sleep while in an atomic context.

There's no need to keep the block group locked at this point, so hoist
the ext4_error() call up to ext4_validate_block_bitmap() and release
the block group spinlock before calling ext4_error().

The reported stack trace can be found at:

http://article.gmane.org/gmane.comp.file-systems.ext4/33731

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/balloc.c
fs/ext4/bitmap.c