ext4: add strict range checks while freeing blocks
stable inclusion from stable-v5.10.175 commit c3fd717b58f0a3e2461c16e2360ee6a949b47940 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8711T Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c3fd717b58f0a3e2461c16e2360ee6a949b47940 -------------------------------- commit a00b482b upstream. 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> Signed-off-by:
Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment