From patchwork Tue Jan 20 23:43:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1723 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=1768952720; bh=d1Xubs+js05yJMxgZjadzoh9qJDcIObJ5DCDnqK47BQ=; 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=KB/VFg1KB0JixphsUHLTR9vql/Mw2YPvZaGHCAezyshKjFaXqOmCJkj21ZZ3U0YsH IxgbItI1ad00TdIzBiQ3evftE05+jBWGHwLydK1WDId7p3nQlE8JBweehBlCcGgbux VP5EXaRBxFUPBKW+XpD/T2YSPAnvIac6EtSueBrv5/ZmXRX3bowycA/jnp5E6gBy/F xjHDd0tPIUqRwsoS6cxWxy9bZdMLBGm9CVf1M4ZPQvLo9buHm2FrXA2ctLaMfQFo9o /5mTvEzihyEqognF6PifSmQaxacaChZn+o2x8uU3+7cDxLYtisCGtkRFry1ukbBg+T lg8dlEw76qzUQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 372DB69597 for ; Tue, 20 Jan 2026 16:45:20 -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 V5jtxaccf6TY for ; Tue, 20 Jan 2026 16:45:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952720; bh=d1Xubs+js05yJMxgZjadzoh9qJDcIObJ5DCDnqK47BQ=; 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=KB/VFg1KB0JixphsUHLTR9vql/Mw2YPvZaGHCAezyshKjFaXqOmCJkj21ZZ3U0YsH IxgbItI1ad00TdIzBiQ3evftE05+jBWGHwLydK1WDId7p3nQlE8JBweehBlCcGgbux VP5EXaRBxFUPBKW+XpD/T2YSPAnvIac6EtSueBrv5/ZmXRX3bowycA/jnp5E6gBy/F xjHDd0tPIUqRwsoS6cxWxy9bZdMLBGm9CVf1M4ZPQvLo9buHm2FrXA2ctLaMfQFo9o /5mTvEzihyEqognF6PifSmQaxacaChZn+o2x8uU3+7cDxLYtisCGtkRFry1ukbBg+T lg8dlEw76qzUQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 206A4695B2 for ; Tue, 20 Jan 2026 16:45:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952718; bh=ReUcHMt/jZtz8QwPixh79a3vOi5eyQmVRVTflN7uWKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bhElviS+7lvX5lhNorGnvObQTs6LeO6nsKjS1wnK4NA9Y8Shhz1sOBqPllaPFGxlK +SGolUnRq/IaYFepnYyGbQJEeJauKO/LHUNT+bxyyQb1otkfWh6caUR93V2WOgKKVM lOVeVdGXi5Jd/MnKGJqGT8mYNdTS7H6Y+Cp139ePhgQvWNIVf+GplA5xTXGP3XbAkC /Mla/OYsvxZTZRJ5euSAJgLwRHbcJvJASNMoWtfY/GtqsZGZtECPeVChnqrOKIYojg OmSWNMZJ6GGi3PWd4ChSS2A1tTUbQVjNtyVHPiTQp9XdNWz6OImSTsefEsHVvrq6fc KCColPXIsCZlA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B3AC9695A6; Tue, 20 Jan 2026 16:45:18 -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 XvrNnVfCz8cy; Tue, 20 Jan 2026 16:45:18 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952714; bh=nGLf8KWTgWcJ9OxtPvDxpeKonm9wOowM/aCEiCXap4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S2LCNc4hFC0Sr5Af+J0Wggz02lAKJhNfcFf5bt9fojafLYJNvWC5J4r/TEDAiRywU G2FfDeUnt6miIbdgC9LgEfzDy9wMCow6vr0DVo8bEgdEfHhL7AiIYbV3JiOMqlioAs +NIObZtwvIvFZ41gQJPbrkZED8msHDPV47aaI6mahi3AnmVNUM2AX7dg+NNNL3Lppn VdkGj1JHAd0Jhg3UYokR1umAog1Nl/hXtL5BrXP3ipIQ0a1rPFDLZxCKis7A+hP9Ay lgjnGfwbJGD1iW5tIdkO/8CgvBhZqQ6AESUe2aw+od1izxTCedWbIovWnlITgPf+lk pi2gmIMb3H1Rg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 62E1469555; Tue, 20 Jan 2026 16:45:14 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 20 Jan 2026 16:43:34 -0700 Message-ID: <20260120234344.495605-15-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: B7LVOXLA3VYGZUU3ROXMOW7JCQZ5YOYE X-Message-ID-Hash: B7LVOXLA3VYGZUU3ROXMOW7JCQZ5YOYE 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 14/17] ext4l: Move super_operations to linux/fs/super_types.h 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 struct super_operations to linux/fs/super_types.h where the Linux kernel defines it, alongside struct super_block. Add forward declarations for the types used by super_operations members. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 21 +-------------------- include/linux/fs/super_types.h | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 12250b8daf4..1ac7b63819a 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -954,26 +954,7 @@ static u64 __attribute__((unused)) __ext4_sectors[2]; struct kstatfs; struct fid; -/* super_operations - for VFS */ -struct super_operations { - struct inode *(*alloc_inode)(struct super_block *); - void (*free_inode)(struct inode *); - void (*destroy_inode)(struct inode *); - int (*write_inode)(struct inode *, struct writeback_control *); - void (*dirty_inode)(struct inode *, int); - int (*drop_inode)(struct inode *); - void (*evict_inode)(struct inode *); - void (*put_super)(struct super_block *); - int (*sync_fs)(struct super_block *, int); - int (*freeze_fs)(struct super_block *); - int (*unfreeze_fs)(struct super_block *); - int (*statfs)(struct dentry *, struct kstatfs *); - int (*show_options)(struct seq_file *, struct dentry *); - void (*shutdown)(struct super_block *); - ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); - ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); - struct dentry *(*get_dquots)(struct inode *); -}; +/* super_operations is in linux/fs/super_types.h */ /* export_operations and fid - use linux/exportfs.h */ #include diff --git a/include/linux/fs/super_types.h b/include/linux/fs/super_types.h index f3ed772ef40..67e02a04bfb 100644 --- a/include/linux/fs/super_types.h +++ b/include/linux/fs/super_types.h @@ -20,6 +20,10 @@ struct file_system_type; struct super_operations; struct export_operations; struct xattr_handler; +struct inode; +struct writeback_control; +struct kstatfs; +struct seq_file; /* sb_writers stub */ struct sb_writers { @@ -54,6 +58,28 @@ struct super_block { struct list_head s_inodes; }; +/* super_operations - VFS superblock operations */ +struct super_operations { + struct inode *(*alloc_inode)(struct super_block *); + void (*free_inode)(struct inode *); + void (*destroy_inode)(struct inode *); + int (*write_inode)(struct inode *, struct writeback_control *); + void (*dirty_inode)(struct inode *, int); + int (*drop_inode)(struct inode *); + void (*evict_inode)(struct inode *); + void (*put_super)(struct super_block *); + int (*sync_fs)(struct super_block *, int); + int (*freeze_fs)(struct super_block *); + int (*unfreeze_fs)(struct super_block *); + int (*statfs)(struct dentry *, struct kstatfs *); + int (*show_options)(struct seq_file *, struct dentry *); + void (*shutdown)(struct super_block *); + ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); + ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, + loff_t); + struct dentry *(*get_dquots)(struct inode *); +}; + /* Superblock flags - also defined in linux/fs.h */ #ifndef SB_RDONLY #define SB_RDONLY (1 << 0) /* Read-only mount */