ext4: protect journal inode's blocks using block_validity
authorTheodore Ts'o <tytso@mit.edu>
Wed, 10 Apr 2019 03:37:08 +0000 (23:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Sep 2019 06:22:11 +0000 (08:22 +0200)
commit2fd4629de51974002f4e9cf1a35a1926dd6c9d99
tree478923fadbd59d0a649d0f50134115a9570ad8cf
parentf10a92309b8392637e388948e313d00c5d34bf1b
ext4: protect journal inode's blocks using block_validity

[ Upstream commit 345c0dbf3a30872d9b204db96b5857cd00808cae ]

Add the blocks which belong to the journal inode to block_validity's
system zone so attempts to deallocate or overwrite the journal due a
corrupted file system where the journal blocks are also claimed by
another inode.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202879
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ext4/block_validity.c
fs/ext4/inode.c