summaryrefslogtreecommitdiffstats
path: root/tools/virtio
diff options
context:
space:
mode:
authorJia Rui <jindui71@gmail.com>2023-10-18 21:18:11 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-11-01 20:46:58 +0100
commit873ed7222c17cfd3cba1b1147552171581ffa6ca (patch)
treee8c3b2c3f9fbb7669b99c21a7254fc447281d5bc /tools/virtio
parentocfs2: fix a typo in a comment (diff)
downloadlinux-873ed7222c17cfd3cba1b1147552171581ffa6ca.tar.xz
linux-873ed7222c17cfd3cba1b1147552171581ffa6ca.zip
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/20231018191811.412458-1-jindui71@gmail.com Signed-off-by: Jia Rui <jindui71@gmail.com> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/virtio')
0 files changed, 0 insertions, 0 deletions