ext4: convert BUG_ON's to WARN_ON's in mballoc.c
authorTheodore Ts'o <tytso@mit.edu>
Tue, 14 Apr 2020 03:33:05 +0000 (23:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 May 2020 06:48:59 +0000 (08:48 +0200)
commit3e9299c28fc5d2033c55775ae1809a3976b0d09b
treed3686401dfcd03d4ee748dab1b969d57e134d597
parent1e4281eba3ffd6a4ad4427bcfb9933c24340bb32
ext4: convert BUG_ON's to WARN_ON's in mballoc.c

[ Upstream commit 907ea529fc4c3296701d2bfc8b831dd2a8121a34 ]

If the in-core buddy bitmap gets corrupted (or out of sync with the
block bitmap), issue a WARN_ON and try to recover.  In most cases this
involves skipping trying to allocate out of a particular block group.
We can end up declaring the file system corrupted, which is fair,
since the file system probably should be checked before we proceed any
further.

Link: https://lore.kernel.org/r/20200414035649.293164-1-tytso@mit.edu
Google-Bug-Id: 34811296
Google-Bug-Id: 34639169
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/mballoc.c