From patchwork Tue Jan 20 23:43:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1711 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=1768952668; bh=Nptn9nbutQudFpuZtiMDFz6o/EOLdo4G8l6ZmIFPwio=; 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=AngXi7pQ7i12lFxxuVSsCNsPpbGDPsrrPEhKl+95KcBhlkegz/Iue9kHp+TiZ34HZ fU1vPvG1kmI9X1j5e5oJhw4h2Lh6/O9ehTytwlcSucZQvnmVb/9EXi5MRWyPgwzbHn IqQR69AGuFaDchPARUDb1g7WzWvi/v7hO9HJMykzZChSOmBlwWVtKey6BQPuD6NmCo 3ikG9Qc32GZkUAD0wAIPck20xduF2sIBeAkUhViLvMd7Ak/u+FXHhYTRNTVac248/B xCvzkOwfwGmLtAmsoOGoyj48PPil0t/XtZHxGLCfrxVE6Mt2MFgBwpi9aE8e7LB+Qr rO42oQvNq3F0Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8B3F4695AE for ; Tue, 20 Jan 2026 16:44: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 10024) with ESMTP id AZyjsa2vU0W8 for ; Tue, 20 Jan 2026 16:44:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952668; bh=Nptn9nbutQudFpuZtiMDFz6o/EOLdo4G8l6ZmIFPwio=; 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=AngXi7pQ7i12lFxxuVSsCNsPpbGDPsrrPEhKl+95KcBhlkegz/Iue9kHp+TiZ34HZ fU1vPvG1kmI9X1j5e5oJhw4h2Lh6/O9ehTytwlcSucZQvnmVb/9EXi5MRWyPgwzbHn IqQR69AGuFaDchPARUDb1g7WzWvi/v7hO9HJMykzZChSOmBlwWVtKey6BQPuD6NmCo 3ikG9Qc32GZkUAD0wAIPck20xduF2sIBeAkUhViLvMd7Ak/u+FXHhYTRNTVac248/B xCvzkOwfwGmLtAmsoOGoyj48PPil0t/XtZHxGLCfrxVE6Mt2MFgBwpi9aE8e7LB+Qr rO42oQvNq3F0Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7B01169597 for ; Tue, 20 Jan 2026 16:44:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952667; bh=syqP0LKNIrEq2XXUJn7d4SOxFff/c8IZwJu8ewwljYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HJ6utOCeBQwHJqdodQiWaJjnlexBd+G7qpApERJ3uzx/xt2/1mwEX2LMl2DcPMozs hKJfJQd1HIMJfrqBHb1KyX6QRvOXwu/3d9fIZJUga6jGfeCggOtlATXiwSrstV7SEO m3RtNB4UXQoHpoYKL9dQBx4kWdWXKB5S4Zp1CWU10QviRZLV4sGF18DqxmUMShGSw3 2eP8mUxSzIobKOcsvg42bE43moW/67m09lvLFmXPsYGwQfuaV4YW1Hia5CvvRGLho4 qcFjBQy+fxD4mthZJhqi7e+I/KibwaJAUNXXH3CqlkWeW/8KsTk+8UQQz38pMasf5a 52EtMJNAkMcwg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0015969590; Tue, 20 Jan 2026 16:44:27 -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 ShL61T8R8_5W; Tue, 20 Jan 2026 16:44:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952662; bh=l6rgvFLEFtHFN1WLqih3zzg9egWrDtT4KvrSrS042hw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ROtrOEucNjpy745COzmp04yyyi9OmifDhnlOczMaJ5Dm6SxQ6WAah/15YGK9+eOU6 J8cTROToGjlaM8AWWMpmW2S/aWK7xfEZZozkBS4gzavE8cOWm7Ub5WRRycBOtRQFiB cfnJ5lfh7CY1ALIe+JWJh7Yv5nrDNwqmPsxvQubFtuPk7B6/VQFpUk11BZ5xyOHzMQ nBLMWQLy1wUXCoKjNHe2zRQIS6TdTYmQQLDWmh2n+VV6AktvdTML4Xa8wOhYn029tz KFA44WpMVUAJMunVQ7hXo6s2V89i6RkvcXsZsysDsdFckgvitSleUupHfa55kxSlg0 TvnCzLJoC43Ow== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A644F69555; Tue, 20 Jan 2026 16:44:22 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 20 Jan 2026 16:43:22 -0700 Message-ID: <20260120234344.495605-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260120234344.495605-1-sjg@u-boot.org> References: <20260120234344.495605-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KTVYB3NKJP5K3QGHXGGL3LWICIEAYZJL X-Message-ID-Hash: KTVYB3NKJP5K3QGHXGGL3LWICIEAYZJL 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 02/17] ext4l: Move inode helpers to standard linux headers 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 Move several inode-related stubs to their canonical Linux header locations: - inode_needs_sync and is_bad_inode to linux/fs.h - in_group_p to linux/cred.h These are standard Linux kernel interfaces that belong in their respective headers rather than in the ext4l compatibility layer. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 9 +++------ include/linux/cred.h | 3 +++ include/linux/fs.h | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 2255458a46d..d21462407a8 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -197,8 +197,7 @@ static inline void memalloc_nofs_restore(unsigned int flags) { } struct buffer_head *sb_getblk(struct super_block *sb, sector_t block); /* wait_on_bit_io is now in linux/wait_bit.h */ -/* inode_needs_sync - stub */ -#define inode_needs_sync(inode) (0) +/* inode_needs_sync is in linux/fs.h */ /* Memory barriers are now in linux/smp.h */ @@ -222,8 +221,7 @@ struct buffer_head *sb_getblk(struct super_block *sb, sector_t block); /* percpu_counter operations are in linux/percpu_counter.h */ -/* Group permission - stub */ -#define in_group_p(gid) (0) +/* in_group_p is in linux/cred.h */ /* Quota operations - use linux/quotaops.h */ #include @@ -270,8 +268,7 @@ int __ext4_xattr_set_credits(struct super_block *sb, struct inode *inode, #endif /* ext4_init_security is provided by xattr.h */ -/* inode state stubs */ -#define is_bad_inode(inode) (0) +/* is_bad_inode is in linux/fs.h */ /* Block device operations - stubs */ #define sb_issue_zeroout(sb, blk, num, gfp) ({ (void)(sb); (void)(blk); (void)(num); (void)(gfp); 0; }) diff --git a/include/linux/cred.h b/include/linux/cred.h index a3a972a5a73..32b15dfc72e 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -59,4 +59,7 @@ struct user_namespace { extern struct user_namespace init_user_ns; +/* in_group_p - check if current process is in group (always false in U-Boot) */ +#define in_group_p(gid) (0) + #endif /* _LINUX_CRED_H */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 1b0059ca1a7..b6a0596a9de 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -305,6 +305,12 @@ enum { #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) +/* inode_needs_sync - check if inode needs synchronous writes (always false) */ +#define inode_needs_sync(inode) (0) + +/* is_bad_inode - check if inode is marked bad (always false in U-Boot) */ +#define is_bad_inode(inode) (0) + /** * struct fstrim_range - fstrim ioctl argument * @start: first byte to trim