mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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: 18792e64c8 ("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:
@@ -3430,11 +3430,9 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
|
|||||||
static inline void verify_blkaddr(struct f2fs_sb_info *sbi,
|
static inline void verify_blkaddr(struct f2fs_sb_info *sbi,
|
||||||
block_t blkaddr, int type)
|
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.",
|
f2fs_err(sbi, "invalid blkaddr: %u, type: %d, run fsck to fix.",
|
||||||
blkaddr, type);
|
blkaddr, type);
|
||||||
f2fs_bug_on(sbi, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool __is_valid_data_blkaddr(block_t blkaddr)
|
static inline bool __is_valid_data_blkaddr(block_t blkaddr)
|
||||||
|
|||||||
Reference in New Issue
Block a user