| Message ID | 20260418004014.1889749-7-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1776472849; bh=jlWW1br4bdXE0b6QbwJBDNewbkJbKpGPSQCePJhdGgM=; 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=SRg+XX34t9upjSobq0Z9dUFgVj9QxhHmicwoBiqKG2S87U8o9eiTK9bPKVwlNqlwp Gj/V2DbkcVQ+BrOsh1lKzLogY1pvScduyAp9lFx9/FDY0LU/HkmvCW/9TjFymIOFeT eqb3ZbcYnmd3SfphJSlQFthFd7DehwxjdRYeR9d4= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D86A96A54B for <u-boot-concept@u-boot.org>; Fri, 17 Apr 2026 18:40:49 -0600 (MDT) 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 9nbu_dXBSXNT for <u-boot-concept@u-boot.org>; Fri, 17 Apr 2026 18:40:49 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472846; bh=jlWW1br4bdXE0b6QbwJBDNewbkJbKpGPSQCePJhdGgM=; 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=bViWwtorBKYBbiw/TJXUIjgKT45sw1JbWRTkLTS1Gf67pnmZT7Y3nfe0YLcG6eFLv IsnWdUFBboj78okbYYia+hBLnf8eL7f3i2b3xoKWs8ieeBlVt6q6B0y1szO8EhVuaJ NWQ2R5rUb4uLw7iOmJXAO4joR/rc5QnWfp/Ut+dw= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CAE086A53D for <u-boot-concept@u-boot.org>; Fri, 17 Apr 2026 18:40:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472845; bh=F456tsVD8FgshFIK40dbeJTrxJTWggD040MVB+g47fo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GrNsC3sBNQqpy4rAfv3D0r8thEeJ1rCeH3er3SFJXbQRoj39/QAIs8ZWjKZENmH2+ 9AYWeDZqOkOFFynDnRV6UjWOZiPPDsnUkal3P5wV8d6h0qeqGpAgfMxV9wmVoP7LpS RIx+TcBlY+92i02UFCxfZyVByl3R+YmstVR1KXMA= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3A47A6A53D; Fri, 17 Apr 2026 18:40:45 -0600 (MDT) 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 3xx2eL6RpZDT; Fri, 17 Apr 2026 18:40:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472843; bh=lvYav2EkWkzqN5Y5GRP3yl+rkZ6hEuStbXpAOq55Z5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RXkqj0AgBHNHvi9Qo5sbqLshzj40vixDGSuKgFK9jZNoTUfbyaELhppY+ZKodwZK2 cEepfh8/tAeru1ETaRqR1x8FH9wcoebMTr9YHadgZnok+evYRAtVYaKRBBXkolldsO dDplAKhODQDcyeRTuLL2v8Q5c1INH+I9QsUwnB+s= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id BE8346A516; Fri, 17 Apr 2026 18:40:42 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Fri, 17 Apr 2026 18:40:00 -0600 Message-ID: <20260418004014.1889749-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260418004014.1889749-1-sjg@u-boot.org> References: <20260418004014.1889749-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2UIPFQXQLQANT3CFYJUPY3DIIPN2WGVQ X-Message-ID-Hash: 2UIPFQXQLQANT3CFYJUPY3DIIPN2WGVQ 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 <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/10] fs: Guard journal_head deref under FS_EXT4L List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/2UIPFQXQLQANT3CFYJUPY3DIIPN2WGVQ/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
efi-x86: boot Ubuntu live ISOs via U-Boot + BLS
|
|
Commit Message
Simon Glass
April 18, 2026, 12:40 a.m. UTC
From: Simon Glass <sjg@chromium.org> bh_cache_release_jbd() dereferences journal_head fields to clear the buffer-to-journal link. When CONFIG_FS_EXT4L is disabled, the file forward-declares struct journal_head with no definition and buffer_jbd() expands to a literal 0, so the inner block is dead code. The compiler still type-checks it, however, and rejects the dereference of an incomplete type. Wrap the loop body in #if IS_ENABLED(CONFIG_FS_EXT4L) so the function reduces to an empty stub when ext4l is off, matching how buffer_jbd() and bh2jh() work. Signed-off-by: Simon Glass <sjg@chromium.org> --- fs/linux_fs.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/fs/linux_fs.c b/fs/linux_fs.c index f922bed3b84..04f4c551f0b 100644 --- a/fs/linux_fs.c +++ b/fs/linux_fs.c @@ -243,6 +243,7 @@ void bh_cache_clear(struct block_device *bdev) */ void bh_cache_release_jbd(struct block_device *bdev) { +#if IS_ENABLED(CONFIG_FS_EXT4L) int i; struct bh_cache_entry *entry; @@ -264,6 +265,7 @@ void bh_cache_release_jbd(struct block_device *bdev) } } } +#endif } /**