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>
Sat, 2 May 2020 15:24:45 +0000 (17:24 +0200)
commit795762468125a6412c089651e74f780bee154118
tree7b356bf6204b267439f04b1777d11f140173bd68
parentadd40f8f1a84d7c8feb76e8ab7f197a5b0627bd8
ext4: protect journal inode's blocks using block_validity

commit 345c0dbf3a30872d9b204db96b5857cd00808cae upstream.

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: Ashwin H <ashwinh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/block_validity.c
fs/ext4/inode.c