Re: [syzbot] Re: kernel BUG in ocfs2_set_new_buffer_uptodate()
From: syzbot
Date: Fri Dec 27 2024 - 05:54:12 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: Re: kernel BUG in ocfs2_set_new_buffer_uptodate()
Author: dmantipov@xxxxxxxxx
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d6ef8b40d075c425f548002d2f35ae3f06e9cf96
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 213206ebdd58..3bfbc166d1fe 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -416,6 +416,9 @@ static struct buffer_head *ocfs2_find_entry_id(const char *name,
if (found == 1)
return di_bh;
+ /* Cached by ocfs2_read_blocks() so remove it. */
+ ocfs2_remove_from_cache(INODE_CACHE(dir), di_bh);
+
brelse(di_bh);
out:
return NULL;