From patchwork Tue Dec 30 20:51:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1113 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127951; bh=Fn1EUialN0gw7QeGa/gztiGQ2OVHRSBh0uU0zWDsxiE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qPW0xWBe4jK+bzc0uE8RVvvlc3Fy3NSuO5re5sQJAoVonGTzWJPzW9xniB4w79bHJ HbE3vX1sjepxgAs39kS4zhNAX/DnHWj6+aO6IYxl6WcXbUUPuuTAo5Kt8wv3gVwuxI nlNHobkjnXjJlAet0wb2UiZHv/Sg7Pj4X4ERJw/dfODrqt1xwQcT2TW36JkYR706uq Bp3Zj/ZU35M1E9/YbrWbthzxdx9lhga3q4qTWffcKIlguod3O1qbB3FxzgoSzuR/xA fwKtvcEEIkwijW7tJDSX6vFepUU3lBF0Vdb7t41a/fo7hz/MkRQ0uJvAG0sjrydlMC APAF77EoJVNqw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0155B68F7D for ; Tue, 30 Dec 2025 13:52:31 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id VJeLlwWkqkrk for ; Tue, 30 Dec 2025 13:52:30 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127950; bh=Fn1EUialN0gw7QeGa/gztiGQ2OVHRSBh0uU0zWDsxiE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=e1FaAnB0ZBniuHcT2ri3NpM8yb0dYAHQvgqiZRTgZPR2tEf0EPzP2bS0A4iU5Oag0 Vu+C80HG8wttErOvXjR+i7+tFVUG84+3747IQwLz9aKEupXO4Khmcv3JXKdww8r2u+ rEIF1yDSYiWRFScgVdh09VWeNkoZostzoAEIhlBG/jKuYHdmrO7SwgI+TNC70wlCru U8oO/7nw/qAqDFDB0zOhUz+7aH9YpK5VMTD5KkHHi7EEg4JLJmlaZzaMS7FffocuYt xd8azif+cNFoeI1gHosy0GG6by+dH2rHmcAhmETdFIwdixnLbbjWMfwABskDm6UxPM FrVNdp4yKf+7A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E610E68F77 for ; Tue, 30 Dec 2025 13:52:30 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127948; bh=au7siNHUCSnulnzSPJ/scL1E/9yHJTLqps7vz2LL2ww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eg17es117hXpCNDvxvaw02/Fp3YPUjRunR416q5xB6fnbeHFWHl1JJXRuZmJpnQwW G5M7sy/PkOyctjPYF5ajZyHFrPGAoXZ52uKFPE1j/SHZ22BW1rw4qudKbvMmI54Vif RSxLXMYcf7NhSGhPvu7nC4MZgsxNu7RBzuGKfxMgZUES+epeTyFo9qWdWcT7vMsGFl P99EsxvQ7lGmHot348w7DbW70LEeVaxhXXCdp9Rcjf4UoLmN4gmFFRP1uah6YDu1rD I+KxVDaoHWJNdjSKrledVJ2Am9T4uP5MHqNxY3i4qYekBM6DBBOJKWv8kjONMZ8Bsq JlbpFzhl0T2Mg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E44F568C13; Tue, 30 Dec 2025 13:52:28 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id gQmCQA0qo14z; Tue, 30 Dec 2025 13:52:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767127944; bh=PEULgvM1IDjY5DFgq+4mZZcuVNFCS04i9LvD5bCowdo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B4AonyVJiYDULay66OyZ21wiZ4g6i3EQMKPS7KhxU1n22WPcFSUrChLA0YDDjNgxv VIBhBapM7ttg3d5SEnQ5i2uDD+iqu9KFkjrzDSiIyG27BLlFwksJzqcM3gU9sul493 itjxST1nblhmVelepOj0yWESwpDYsmDp0Rg0HWRdUsxQQ+nQ0YeCfdcj2Gtp5fqS1s tz5jvV6RPcw6J86lVGKcgvbLFfJ6/J23Arbp42O/9RlIjg9Et/Bs0XH+yYdWxO/9Kp djOnOFTpR6oxoMlogyI5X1ETv+ao8rob/4Uj2VQS7tPQVRXV3AkUU9AviRc/gLnShI b/Aw152SrnmGw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E34A368BF0; Tue, 30 Dec 2025 13:52:23 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 30 Dec 2025 13:51:41 -0700 Message-ID: <20251230205157.3383926-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251230205157.3383926-1-sjg@u-boot.org> References: <20251230205157.3383926-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JAXK5K4XK5FLSZWPA34373IM4CZ6LKIU X-Message-ID-Hash: JAXK5K4XK5FLSZWPA34373IM4CZ6LKIU X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/14] linux: ext4l: Skip orphan handling in U-Boot List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Skip orphan handling in U-Boot. We do synchronous journal commits after each operation, so orphan recovery is not needed. Adding to the orphan list without proper locking can corrupt the list. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/orphan.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/ext4l/orphan.c b/fs/ext4l/orphan.c index 32ec59b2978..b142c1bd21f 100644 --- a/fs/ext4l/orphan.c +++ b/fs/ext4l/orphan.c @@ -103,6 +103,15 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode) int err = 0, rc; bool dirty = false; +#ifdef __UBOOT__ + /* + * Skip orphan handling in U-Boot. We do synchronous journal commits + * after each operation, so orphan recovery is not needed. Adding to + * the orphan list without proper locking can corrupt the list. + */ + return 0; +#endif + if (!sbi->s_journal || is_bad_inode(inode)) return 0;