+2
−1
Loading
If ext2_get_blocks() is called with maxblocks == 0, it currently triggers a BUG_ON(), causing a kernel panic. While this condition implies a logic error in the caller, a filesystem should not crash the system due to invalid arguments. Replace the BUG_ON() with a WARN_ON_ONCE() to provide a stack trace for debugging, and return -EINVAL to handle the error gracefully. Signed-off-by:Milos Nikic <nikic.milos@gmail.com> Link: https://patch.msgid.link/20260207010617.216675-1-nikic.milos@gmail.com Signed-off-by:
Jan Kara <jack@suse.cz>