2019-11-01 16:40:12

by Jaegeuk Kim

[permalink] [raw]
Subject: [PATCH] f2fs: avoid kernel panic on corruption test

xfstests/generic/475 complains kernel warn/panic while testing corrupted disk.

Signed-off-by: Jaegeuk Kim <[email protected]>
---
fs/f2fs/node.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8b66bc4c004b..06fd6d77d34b 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2349,7 +2349,6 @@ static int __f2fs_build_free_nids(struct f2fs_sb_info *sbi,

if (ret) {
up_read(&nm_i->nat_tree_lock);
- f2fs_bug_on(sbi, !mount);
f2fs_err(sbi, "NAT is corrupt, run fsck to fix it");
return ret;
}
--
2.19.0.605.g01d371f741-goog


2019-11-05 02:24:24

by Chao Yu

[permalink] [raw]
Subject: Re: [f2fs-dev] [PATCH] f2fs: avoid kernel panic on corruption test

On 2019/11/2 0:36, Jaegeuk Kim wrote:
> xfstests/generic/475 complains kernel warn/panic while testing corrupted disk.
>
> Signed-off-by: Jaegeuk Kim <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,