From: syzbot <syzbot+78359d5fbb04318c35e9@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: test patch
Date: Sun, 01 Mar 2026 21:31:20 -0800 [thread overview]
Message-ID: <69a520a8.050a0220.3a55be.0070.GAE@google.com> (raw)
In-Reply-To: <66fdfef3.050a0220.9ec68.0031.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: test patch
Author: heming.zhao@suse.com
#syz test
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index e85b1ccf81be..77b8f0363e94 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -311,11 +311,25 @@ int ocfs2_lock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex)
spin_unlock(&dq_data_lock);
if (ex) {
inode_lock(oinfo->dqi_gqinode);
- down_write(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem);
+ if (!down_write_trylock(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem)) {
+ inode_unlock(oinfo->dqi_gqinode);
+ status = -EBUSY;
+ goto bail;
+ }
} else {
down_read(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem);
}
return 0;
+
+bail:
+ /* does a similar job as ocfs2_unlock_global_qf */
+ ocfs2_inode_unlock(oinfo->dqi_gqinode, ex);
+ brelse(oinfo->dqi_gqi_bh);
+ spin_lock(&dq_data_lock);
+ if (!--oinfo->dqi_gqi_count)
+ oinfo->dqi_gqi_bh = NULL;
+ spin_unlock(&dq_data_lock);
+ return status;
}
void ocfs2_unlock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex)
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index c4e0117d8977..e749cd064c87 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -1224,7 +1224,9 @@ int ocfs2_create_local_dquot(struct dquot *dquot)
int status;
u64 pcount;
- down_write(&OCFS2_I(lqinode)->ip_alloc_sem);
+ if (!down_write_trylock(&OCFS2_I(lqinode)->ip_alloc_sem))
+ return -EBUSY;
+
chunk = ocfs2_find_free_entry(sb, type, &offset);
if (!chunk) {
chunk = ocfs2_extend_local_quota_file(sb, type, &offset);
--
2.43.0
prev parent reply other threads:[~2026-03-02 5:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 2:18 [syzbot] [ocfs2?] possible deadlock in ocfs2_del_inode_from_orphan syzbot
2024-12-19 8:16 ` syzbot
2026-01-06 11:30 ` Syzbot test for ocfs2: Fix " Prithvi Tambewagh
2026-01-06 11:59 ` [syzbot] [ocfs2?] possible " syzbot
2026-02-23 3:38 ` Forwarded: Syzbot test for v2: ocfs2: clear lock identity upon inode eviction syzbot
2026-02-23 4:31 ` syzbot
2026-02-24 5:28 ` Forwarded: test patch syzbot
2026-02-24 6:35 ` syzbot
2026-03-02 5:31 ` syzbot [this message]
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=69a520a8.050a0220.3a55be.0070.GAE@google.com \
--to=syzbot+78359d5fbb04318c35e9@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.