]> git.ipfire.org Git - people/ms/linux.git/commit - fs/ext4/mballoc.c
ext4: add strict range checks while freeing blocks
authorRitesh Harjani <riteshh@linux.ibm.com>
Wed, 16 Feb 2022 07:02:50 +0000 (12:32 +0530)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 26 Feb 2022 02:34:56 +0000 (21:34 -0500)
commita00b482b82fb098956a5bed22bd7873e56f152f1
tree0442195440cfc6df54400bbb70c099682a5b446e
parent6bc6c2bdf1baca6522b8d9ba976257d722423085
ext4: add strict range checks while freeing blocks

Currently ext4_mb_clear_bb() & ext4_group_add_blocks() only checks
whether the given block ranges (which is to be freed) belongs to any FS
metadata blocks or not, of the block's respective block group.
But to detect any FS error early, it is better to add more strict
checkings in those functions which checks whether the given blocks
belongs to any critical FS metadata or not within system-zone.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/ddd9143d064774e32d6364a99667817c6e8bfdc0.1644992610.git.riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c