linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr
@ 2022-04-08  5:22 Dongliang Mu
  2022-04-09  0:27 ` Chao Yu
  0 siblings, 1 reply; 10+ messages in thread
From: Dongliang Mu @ 2022-04-08  5:22 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu
  Cc: Dongliang Mu, syzbot+763ae12a2ede1d99d4dc, linux-f2fs-devel,
	linux-kernel

From: Dongliang Mu <mudongliangabcd@gmail.com>

In f2fs_is_valid_blkaddr, if type is DATA_GENERIC_ENHANCE or
DATA_GENERIC_ENHANCE_READ, it invokes WARN_ON(1) not matter
blkaddr is in the range or not.

Fix this by removing WARN_ON.

Note that, syzbot patch testing does not incur any further issues

Reported-by: syzbot+763ae12a2ede1d99d4dc@syzkaller.appspotmail.com
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
 fs/f2fs/checkpoint.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index f5366feea82d..521498b2dd8c 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -158,7 +158,6 @@ static bool __is_bitmap_valid(struct f2fs_sb_info *sbi, block_t blkaddr,
 		f2fs_err(sbi, "Inconsistent error blkaddr:%u, sit bitmap:%d",
 			 blkaddr, exist);
 		set_sbi_flag(sbi, SBI_NEED_FSCK);
-		WARN_ON(1);
 	}
 	return exist;
 }
@@ -196,7 +195,6 @@ bool f2fs_is_valid_blkaddr(struct f2fs_sb_info *sbi,
 			f2fs_warn(sbi, "access invalid blkaddr:%u",
 				  blkaddr);
 			set_sbi_flag(sbi, SBI_NEED_FSCK);
-			WARN_ON(1);
 			return false;
 		} else {
 			return __is_bitmap_valid(sbi, blkaddr, type);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-12 10:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08  5:22 [PATCH] fs: f2fs: remove WARN_ON in f2fs_is_valid_blkaddr Dongliang Mu
2022-04-09  0:27 ` Chao Yu
2022-04-09  1:34   ` Dongliang Mu
2022-04-09  3:46     ` Chao Yu
2022-04-09  6:42       ` Dongliang Mu
2022-04-11  3:09         ` [f2fs-dev] " Chao Yu
2022-04-11  5:06           ` Dongliang Mu
2022-04-11  6:14             ` Eric Biggers
2022-04-11  9:53               ` Chao Yu
2022-04-12  9:25                 ` Dongliang Mu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).