mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@bonn-fries.net>
To: linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
	Alexander Viro <viro@math.psu.edu>,
	Linus Torvalds <torvalds@transmeta.com>
Subject: [RFC] Unbork fs.h, 4 of 4
Date: Sun, 6 Jan 2002 23:17:28 +0100	[thread overview]
Message-ID: <E16NLbd-0001LT-00@starship.berlin> (raw)

This is the last of a set of 4 patches aimed at removing the ext2-specific 
inode and super block includes from include/linux/fs.h, with a view to 
establishing a pattern for updating all the filesystems in the source tree 
to remove the union entirely.  Please see the first posting in this series
for details.

This patch removes the two ext2-specific includes from /include/linux/fs.h,
moves them to ext2_fs.h, removes the two ext2-specific members from the 
fs.h unions, and enables the new variable size per-filesystem functionality
for inodes and super blocks.

To apply:

    cd /your/2.4.17/tree
    cat this/patch | patch -p1

--
Daniel

--- 2.4.17.clean/fs/ext2/super.c	Sun Jan  6 17:40:24 2002
+++ 2.4.17/fs/ext2/super.c	Sun Jan  6 17:40:40 2002
@@ -806,16 +806,23 @@
 	return 0;
 }
 
-static DECLARE_FSTYPE_DEV(ext2_fs_type, "ext2", ext2_read_super);
-
+static struct file_system_type ext2_fs = {
+	owner:		THIS_MODULE,
+	fs_flags:	FS_REQUIRES_DEV,
+	name:		"ext2",
+	read_super:	ext2_read_super,
+	super_size:	sizeof(struct ext2_sb_info),
+	inode_size:	sizeof(struct ext2_inode_info)
+};
+ 
 static int __init init_ext2_fs(void)
 {
-        return register_filesystem(&ext2_fs_type);
+        return register_filesystem(&ext2_fs);
 }
 
 static void __exit exit_ext2_fs(void)
 {
-	unregister_filesystem(&ext2_fs_type);
+	unregister_filesystem(&ext2_fs);
 }
 
 EXPORT_NO_SYMBOLS;
--- 2.4.17.clean/include/linux/ext2_fs.h	Sun Jan  6 17:40:24 2002
+++ 2.4.17/include/linux/ext2_fs.h	Sun Jan  6 17:40:40 2002
@@ -17,6 +17,8 @@
 #define _LINUX_EXT2_FS_H
 
 #include <linux/types.h>
+#include <linux/ext2_fs_i.h>
+#include <linux/ext2_fs_sb.h>
 
 /*
  * The second extended filesystem constants/structures
--- 2.4.17.clean/include/linux/fs.h	Sun Jan  6 17:35:40 2002
+++ 2.4.17/include/linux/fs.h	Sun Jan  6 17:40:40 2002
@@ -288,7 +288,6 @@
 
 #include <linux/pipe_fs_i.h>
 #include <linux/minix_fs_i.h>
-#include <linux/ext2_fs_i.h>
 #include <linux/ext3_fs_i.h>
 #include <linux/hpfs_fs_i.h>
 #include <linux/ntfs_fs_i.h>
@@ -478,7 +477,6 @@
 	__u32			i_generation;
 	union {
 		struct minix_inode_info		minix_i;
-		struct ext2_inode_info		ext2_i;
 		struct ext3_inode_info		ext3_i;
 		struct hpfs_inode_info		hpfs_i;
 		struct ntfs_inode_info		ntfs_i;
@@ -667,7 +665,6 @@
 #define MNT_DETACH	0x00000002	/* Just detach from the tree */
 
 #include <linux/minix_fs_sb.h>
-#include <linux/ext2_fs_sb.h>
 #include <linux/ext3_fs_sb.h>
 #include <linux/hpfs_fs_sb.h>
 #include <linux/ntfs_fs_sb.h>
@@ -742,7 +739,6 @@
 
 	union {
 		struct minix_sb_info	minix_sb;
-		struct ext2_sb_info	ext2_sb;
 		struct ext3_sb_info	ext3_sb;
 		struct hpfs_sb_info	hpfs_sb;
 		struct ntfs_sb_info	ntfs_sb;

                 reply	other threads:[~2002-01-06 22:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E16NLbd-0001LT-00@starship.berlin \
    --to=phillips@bonn-fries.net \
    --cc=acme@conectiva.com.br \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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

all inboxes | Powered by JetHome®