Forwarded: Syzbot test for v2: ocfs2: clear lock identity upon inode eviction
From: syzbot
Date: Sun Feb 22 2026 - 23:32:16 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: Syzbot test for v2: ocfs2: clear lock identity upon inode eviction
Author: activprithvi@xxxxxxxxx
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c22e26bd0906e9c8325462993f01adb16b8ea2c0
Signed-off-by: Prithvi Tambewagh <activprithvi@xxxxxxxxx>
---
fs/ocfs2/aops.c | 5 +++++
fs/ocfs2/inode.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 586e3b74d782..54261d7c14fa 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -2420,6 +2420,11 @@ static ssize_t ocfs2_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
struct inode *inode = file->f_mapping->host;
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
get_block_t *get_block;
+ if (IS_NOQUOTA(inode)) {
+ mlog(ML_ERROR, "Direct IO is not allowed for Quota inode %lu\n",
+ inode->i_ino);
+ return -EPERM;
+ }
/*
* Fallback to buffered I/O if we see an inode without
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index fcc89856ab95..e5d932914b70 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1266,6 +1266,7 @@ static void ocfs2_clear_inode(struct inode *inode)
"Clear inode of %llu, alloc_sem is locked\n",
(unsigned long long)oi->ip_blkno);
up_write(&oi->ip_alloc_sem);
+ init_rwsem(&oi->ip_alloc_sem);
mlog_bug_on_msg(oi->ip_open_count,
"Clear inode of %llu has open count %d\n",
--
2.34.1