public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+c16daba279a1161acfb0@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 43e9ad0c55a369ecc84a4788d06a8a6bfa634f1c
Date: Thu, 23 Oct 2025 04:35:38 -0700	[thread overview]
Message-ID: <68fa130a.050a0220.346f24.0077.GAE@google.com> (raw)
In-Reply-To: <675e5ede.050a0220.37aaf.00ed.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 43e9ad0c55a369ecc84a4788d06a8a6bfa634f1c
Author: dmantipov@yandex.ru

diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index fcc89856ab95..60ff8b3068d1 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -859,23 +859,37 @@ static int ocfs2_wipe_inode(struct inode *inode,
 		}
 	}
 
-	/* we do this while holding the orphan dir lock because we
-	 * don't want recovery being run from another node to try an
-	 * inode delete underneath us -- this will result in two nodes
-	 * truncating the same file! */
-	status = ocfs2_truncate_for_delete(osb, inode, di_bh);
-	if (status < 0) {
-		mlog_errno(status);
-		goto bail_unlock_dir;
-	}
-
-	/* Remove any dir index tree */
-	if (S_ISDIR(inode->i_mode)) {
-		status = ocfs2_dx_dir_truncate(inode, di_bh);
+	if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
+		/* Short circuit for an inode with inline data,
+		 * do this just like in ocfs2_truncate_file().
+		 */
+		unmap_mapping_range(inode->i_mapping, PAGE_SIZE - 1, 0, 1);
+		truncate_inode_pages(inode->i_mapping, 0);
+		status = ocfs2_truncate_inline(inode, di_bh, 0,
+					       i_size_read(inode), 1);
 		if (status) {
+			mlog_errno(status);
+			goto bail;
+		}
+	} else {
+		/* we do this while holding the orphan dir lock because we
+		 * don't want recovery being run from another node to try an
+		 * inode delete underneath us -- this will result in two nodes
+		 * truncating the same file! */
+		status = ocfs2_truncate_for_delete(osb, inode, di_bh);
+		if (status < 0) {
 			mlog_errno(status);
 			goto bail_unlock_dir;
 		}
+
+		/* Remove any dir index tree */
+		if (S_ISDIR(inode->i_mode)) {
+			status = ocfs2_dx_dir_truncate(inode, di_bh);
+			if (status) {
+				mlog_errno(status);
+				goto bail_unlock_dir;
+			}
+		}
 	}
 
 	/*Free extended attribute resources associated with this inode.*/

  parent reply	other threads:[~2025-10-23 11:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15  4:45 [syzbot] [ocfs2?] kernel BUG in ocfs2_commit_truncate syzbot
2024-12-16 10:52 ` [syzbot] Re: kernel BUG in ocfs2_commit_truncate() syzbot
2024-12-16 16:43 ` syzbot
2025-10-22 15:05 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 552c50713f273b494ac6c77052032a49bc9255e2 syzbot
2025-10-23 11:35 ` syzbot [this message]
2025-10-23 13:36 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 43e9ad0c55a369ecc84a4788d06a8a6bfa634f1c syzbot
2025-10-24  7:11 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.10.y syzbot
2025-10-24  7:15 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.1.y syzbot
2025-10-24  7:15 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.12.y syzbot
2025-10-28 10:40 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-5.10.y syzbot
2025-10-28 10:41 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-6.1.y syzbot
2025-10-28 10:42 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-6.12.y syzbot
2025-10-28 18:19 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.10.y syzbot
2025-10-28 18:21 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.1.y syzbot
2025-10-28 18:23 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.12.y syzbot
2025-10-29  6:21 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-5.10.y syzbot
2025-10-29  6:25 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.1.y syzbot
2025-10-29  6:27 ` Forwarded: #syz test https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux-6.12.y 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=68fa130a.050a0220.346f24.0077.GAE@google.com \
    --to=syzbot+c16daba279a1161acfb0@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox