diff options
author | Jia Rui <[email protected]> | 2023-10-19 03:18:11 +0800 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2023-11-01 12:46:58 -0700 |
commit | 873ed7222c17cfd3cba1b1147552171581ffa6ca (patch) | |
tree | e8c3b2c3f9fbb7669b99c21a7254fc447281d5bc /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 5176140c5094b5bfd35e19a4f6ab8a10b65da380 (diff) |
ocfs2: replace BUG_ON() at ocfs2_num_free_extents() with ocfs2_error()
The BUG_ON() at ocfs2_num_free_extents() handles the error that
l_tree_deepth of leaf extent block just read form disk is invalid. This
error is mostly caused by file system metadata corruption on the disk.
There is no need to call BUG_ON() to handle such errors. We can return
error code, since the caller can deal with errors from
ocfs2_num_free_extents(). Also, we should make the file system read-only
to avoid the damage from expanding.
Therefore, BUG_ON() is removed and ocfs2_error() is called instead.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Jia Rui <[email protected]>
Reviewed-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions