From: Ryusuke Konishi <konishi.ryusuke@gmail.com>
To: syzbot+c388db0347b7fc88fa7a@syzkaller.appspotmail.com
Cc: syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org,
linux-nilfs@vger.kernel.org
Subject: Re: [syzbot] [nilfs?] WARNING in nilfs_rmdir (3)
Date: Tue, 06 Oct 2026 16:46:26 +0900 (JST) [thread overview]
Message-ID: <20261006.164626.1711564426255042769.konishi.ryusuke@gmail.com> (raw)
In-Reply-To: <6ac3ffc9.34119e79.2f92f3.0037.GAE@google.com>
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a90ee4305c4a
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index e037e0c6e31a..dcfa70f9e5d4 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -341,10 +341,15 @@ static int nilfs_rmdir(struct inode *dir, struct dentry *dentry)
err = -ENOTEMPTY;
if (nilfs_empty_dir(inode)) {
+ if (unlikely(inode->i_nlink != 2)) {
+ nilfs_warn(dir->i_sb,
+ "inconsistent empty directory link count %u (ino=%llu)",
+ inode->i_nlink, inode->i_ino);
+ }
err = nilfs_do_unlink(dir, dentry);
if (!err) {
inode->i_size = 0;
- drop_nlink(inode);
+ clear_nlink(inode);
nilfs_mark_inode_dirty(inode);
drop_nlink(dir);
nilfs_mark_inode_dirty(dir);
--
2.53.0
next prev parent reply other threads:[~2026-10-06 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 21:44 syzbot
2026-10-05 19:51 ` syzbot
2026-10-06 7:46 ` Ryusuke Konishi [this message]
2026-10-06 8:03 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261006.164626.1711564426255042769.konishi.ryusuke@gmail.com \
--to=konishi.ryusuke@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
--cc=syzbot+c388db0347b7fc88fa7a@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®