FROMGIT: f2fs: fix to remove unnecessary f2fs_bug_on() to avoid panic
verify_blkaddr() will trigger panic once we inject fault into
f2fs_is_valid_blkaddr(), fix to remove this unnecessary f2fs_bug_on().
Fixes: 18792e64c86d ("f2fs: support fault injection for f2fs_is_valid_blkaddr()")
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Bug: 313549450
(cherry picked from commit b896e302f79678451a94769ddd9e52e954c64fbb
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Change-Id: Ibffad271c17efd219099f07aab54ac080cae4fba
Signed-off-by: Daeho Jeong <daehojeong@google.com>
This commit is contained in:
parent
33d3b7311b
commit
cc322f7dee
1 changed files with 1 additions and 3 deletions
|
|
@ -3430,11 +3430,9 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
|
|||
static inline void verify_blkaddr(struct f2fs_sb_info *sbi,
|
||||
block_t blkaddr, int type)
|
||||
{
|
||||
if (!f2fs_is_valid_blkaddr(sbi, blkaddr, type)) {
|
||||
if (!f2fs_is_valid_blkaddr(sbi, blkaddr, type))
|
||||
f2fs_err(sbi, "invalid blkaddr: %u, type: %d, run fsck to fix.",
|
||||
blkaddr, type);
|
||||
f2fs_bug_on(sbi, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool __is_valid_data_blkaddr(block_t blkaddr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue