---

 /dev/null         |   59 -------------------------------------------
 fs/hpfs/alloc.c   |    1 
 fs/hpfs/anode.c   |    1 
 fs/hpfs/buffer.c  |    2 -
 fs/hpfs/dir.c     |    3 --
 fs/hpfs/dnode.c   |    1 
 fs/hpfs/ea.c      |    2 -
 fs/hpfs/file.c    |    5 ---
 fs/hpfs/hpfs_fn.h |   73 +++++++++++++++++++++++++++++++++++++-----------------
 fs/hpfs/inode.c   |    4 --
 fs/hpfs/map.c     |    1 
 fs/hpfs/name.c    |    1 
 fs/hpfs/namei.c   |    3 --
 fs/hpfs/super.c   |   34 +++++++++++--------------
 14 files changed, 67 insertions(+), 123 deletions(-)

diff -puN fs/hpfs/alloc.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/alloc.c
--- 25/fs/hpfs/alloc.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/alloc.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,7 +6,6 @@
  *  HPFS bitmap operations
  */
 
-#include <linux/buffer_head.h>
 #include "hpfs_fn.h"
 
 /*
diff -puN fs/hpfs/anode.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/anode.c
--- 25/fs/hpfs/anode.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/anode.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,7 +6,6 @@
  *  handling HPFS anode tree that contains file allocation info
  */
 
-#include <linux/buffer_head.h>
 #include "hpfs_fn.h"
 
 /* Find a sector in allocation tree */
diff -puN fs/hpfs/buffer.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/buffer.c
--- 25/fs/hpfs/buffer.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/buffer.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,8 +6,6 @@
  *  general buffer i/o
  */
 
-#include <linux/buffer_head.h>
-#include <linux/string.h>
 #include "hpfs_fn.h"
 
 void hpfs_lock_creation(struct super_block *s)
diff -puN fs/hpfs/dir.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/dir.c
--- 25/fs/hpfs/dir.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/dir.c	2004-02-29 12:48:36.000000000 -0800
@@ -7,9 +7,6 @@
  */
 
 #include "hpfs_fn.h"
-#include <linux/buffer_head.h>
-#include <linux/time.h>
-#include <linux/smp_lock.h>
 
 static int hpfs_dir_release(struct inode *inode, struct file *filp)
 {
diff -puN fs/hpfs/dnode.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/dnode.c
--- 25/fs/hpfs/dnode.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/dnode.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,7 +6,6 @@
  *  handling directory dnode tree - adding, deleteing & searching for dirents
  */
 
-#include <linux/buffer_head.h>
 #include "hpfs_fn.h"
 
 static loff_t get_pos(struct dnode *d, struct hpfs_dirent *fde)
diff -puN fs/hpfs/ea.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/ea.c
--- 25/fs/hpfs/ea.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/ea.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,8 +6,6 @@
  *  handling extended attributes
  */
 
-#include <linux/buffer_head.h>
-#include <linux/string.h>
 #include "hpfs_fn.h"
 
 /* Remove external extended attributes. ano specifies whether a is a 
diff -puN fs/hpfs/file.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/file.c
--- 25/fs/hpfs/file.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/file.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,11 +6,6 @@
  *  file VFS functions
  */
 
-#include <linux/buffer_head.h>
-#include <linux/string.h>
-#include <linux/time.h>
-#include <linux/smp_lock.h>
-#include <linux/pagemap.h>
 #include "hpfs_fn.h"
 
 #define BLOCKS(size) (((size) + 511) >> 9)
diff -puN fs/hpfs/hpfs_fn.h~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/hpfs_fn.h
--- 25/fs/hpfs/hpfs_fn.h~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/hpfs_fn.h	2004-02-29 12:48:36.000000000 -0800
@@ -9,28 +9,14 @@
 //#define DBG
 //#define DEBUG_LOCKS
 
+#include <linux/pagemap.h>
 #include <linux/buffer_head.h>
-#include <linux/fs.h>
 #include <linux/hpfs_fs.h>
-#include <linux/hpfs_fs_i.h>
-#include <linux/hpfs_fs_sb.h>
-#include <linux/errno.h>
 #include <linux/slab.h>
-#include <linux/kernel.h>
-#include <linux/time.h>
-#include <linux/stat.h>
-#include <linux/string.h>
-#include <asm/bitops.h>
-#include <asm/uaccess.h>
 #include <linux/smp_lock.h>
 
-#include <stdarg.h>
-
 #include "hpfs.h"
 
-#define memcpy_tofs memcpy
-#define memcpy_fromfs memcpy
-
 #define EIOERROR  EIO
 #define EFSERROR  EPERM
 #define EMEMERROR ENOMEM
@@ -56,7 +42,56 @@
 #define PRINTK(x)
 #endif
 
-typedef void nonconst; /* What this is for ? */
+struct hpfs_inode_info {
+	loff_t mmu_private;
+	ino_t i_parent_dir;	/* (directories) gives fnode of parent dir */
+	unsigned i_dno;		/* (directories) root dnode */
+	unsigned i_dpos;	/* (directories) temp for readdir */
+	unsigned i_dsubdno;	/* (directories) temp for readdir */
+	unsigned i_file_sec;	/* (files) minimalist cache of alloc info */
+	unsigned i_disk_sec;	/* (files) minimalist cache of alloc info */
+	unsigned i_n_secs;	/* (files) minimalist cache of alloc info */
+	unsigned i_ea_size;	/* size of extended attributes */
+	unsigned i_conv : 2;	/* (files) crlf->newline hackery */
+	unsigned i_ea_mode : 1;	/* file's permission is stored in ea */
+	unsigned i_ea_uid : 1;	/* file's uid is stored in ea */
+	unsigned i_ea_gid : 1;	/* file's gid is stored in ea */
+	unsigned i_dirty : 1;
+	struct rw_semaphore i_sem;
+	struct semaphore i_parent;
+	loff_t **i_rddir_off;
+	struct inode vfs_inode;
+};
+
+struct hpfs_sb_info {
+	ino_t sb_root;			/* inode number of root dir */
+	unsigned sb_fs_size;		/* file system size, sectors */
+	unsigned sb_bitmaps;		/* sector number of bitmap list */
+	unsigned sb_dirband_start;	/* directory band start sector */
+	unsigned sb_dirband_size;	/* directory band size, dnodes */
+	unsigned sb_dmap;		/* sector number of dnode bit map */
+	unsigned sb_n_free;		/* free blocks for statfs, or -1 */
+	unsigned sb_n_free_dnodes;	/* free dnodes for statfs, or -1 */
+	uid_t sb_uid;			/* uid from mount options */
+	gid_t sb_gid;			/* gid from mount options */
+	umode_t sb_mode;		/* mode from mount options */
+	unsigned sb_conv : 2;		/* crlf->newline hackery */
+	unsigned sb_eas : 2;		/* eas: 0-ignore, 1-ro, 2-rw */
+	unsigned sb_err : 2;		/* on errs: 0-cont, 1-ro, 2-panic */
+	unsigned sb_chk : 2;		/* checks: 0-no, 1-normal, 2-strict */
+	unsigned sb_lowercase : 1;	/* downcase filenames hackery */
+	unsigned sb_was_error : 1;	/* there was an error, set dirty flag */
+	unsigned sb_chkdsk : 2;		/* chkdsk: 0-no, 1-on errs, 2-allways */
+	unsigned char *sb_cp_table;	/* code page tables: */
+					/* 	128 bytes uppercasing table & */
+					/*	128 bytes lowercasing table */
+	unsigned *sb_bmp_dir;		/* main bitmap directory */
+	unsigned sb_c_bitmap;		/* current bitmap */
+	struct semaphore hpfs_creation_de; /* when creating dirents, nobody else
+					   can alloc blocks */
+	/*unsigned sb_mounting : 1;*/
+	int sb_timeshift;
+};
 
 /*
  * conv= options
@@ -162,8 +197,6 @@ static inline unsigned tstbits(unsigned 
 	return 0;
 }
 
-struct statfs;
-
 /* alloc.c */
 
 int hpfs_chk_sectors(struct super_block *, secno, int, char *);
@@ -289,10 +322,7 @@ static inline struct hpfs_sb_info *hpfs_
 
 void hpfs_error(struct super_block *, char *, ...);
 int hpfs_stop_cycles(struct super_block *, int, int *, int *, char *);
-int hpfs_remount_fs(struct super_block *, int *, char *);
-void hpfs_put_super(struct super_block *);
 unsigned hpfs_count_one_bitmap(struct super_block *, secno);
-int hpfs_statfs(struct super_block *, struct kstatfs *);
 
 /*
  * local time (HPFS) to GMT (Unix)
@@ -309,4 +339,3 @@ static inline time_t gmt_to_local(struct
 	extern struct timezone sys_tz;
 	return t - sys_tz.tz_minuteswest * 60 - hpfs_sb(s)->sb_timeshift;
 }
-
diff -puN fs/hpfs/inode.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/inode.c
--- 25/fs/hpfs/inode.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/inode.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,10 +6,6 @@
  *  inode VFS functions
  */
 
-#include <linux/fs.h>
-#include <linux/time.h>
-#include <linux/smp_lock.h>
-#include <linux/buffer_head.h>
 #include "hpfs_fn.h"
 
 void hpfs_init_inode(struct inode *i)
diff -puN fs/hpfs/map.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/map.c
--- 25/fs/hpfs/map.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/map.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,7 +6,6 @@
  *  mapping structures to memory with some minimal checks
  */
 
-#include <linux/buffer_head.h>
 #include "hpfs_fn.h"
 
 unsigned *hpfs_map_dnode_bitmap(struct super_block *s, struct quad_buffer_head *qbh)
diff -puN fs/hpfs/name.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/name.c
--- 25/fs/hpfs/name.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/name.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,7 +6,6 @@
  *  operations with filenames
  */
 
-#include <linux/string.h>
 #include "hpfs_fn.h"
 
 char *text_postfix[]={
diff -puN fs/hpfs/namei.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/namei.c
--- 25/fs/hpfs/namei.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/namei.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,9 +6,6 @@
  *  adding & removing files & directories
  */
 
-#include <linux/pagemap.h>
-#include <linux/string.h>
-#include <linux/buffer_head.h>
 #include "hpfs_fn.h"
 
 static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
diff -puN fs/hpfs/super.c~HPFS7-hpfs_cleanup2-RC4-rc1 fs/hpfs/super.c
--- 25/fs/hpfs/super.c~HPFS7-hpfs_cleanup2-RC4-rc1	2004-02-29 12:48:36.000000000 -0800
+++ 25-akpm/fs/hpfs/super.c	2004-02-29 12:48:36.000000000 -0800
@@ -6,13 +6,11 @@
  *  mounting, unmounting, error handling
  */
 
-#include <linux/buffer_head.h>
-#include <linux/string.h>
 #include "hpfs_fn.h"
 #include <linux/module.h>
 #include <linux/parser.h>
 #include <linux/init.h>
-#include <linux/vfs.h>
+#include <linux/statfs.h>
 
 /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */
 
@@ -101,7 +99,7 @@ int hpfs_stop_cycles(struct super_block 
 	return 0;
 }
 
-void hpfs_put_super(struct super_block *s)
+static void hpfs_put_super(struct super_block *s)
 {
 	struct hpfs_sb_info *sbi = hpfs_sb(s);
 	if (sbi->sb_cp_table) kfree(sbi->sb_cp_table);
@@ -137,7 +135,7 @@ static unsigned count_bitmaps(struct sup
 	return count;
 }
 
-int hpfs_statfs(struct super_block *s, struct kstatfs *buf)
+static int hpfs_statfs(struct super_block *s, struct kstatfs *buf)
 {
 	struct hpfs_sb_info *sbi = hpfs_sb(s);
 	lock_kernel();
@@ -206,18 +204,6 @@ static void destroy_inodecache(void)
 		printk(KERN_INFO "hpfs_inode_cache: not all structures were freed\n");
 }
 
-/* Super operations */
-
-static struct super_operations hpfs_sops =
-{
-	.alloc_inode	= hpfs_alloc_inode,
-	.destroy_inode	= hpfs_destroy_inode,
-	.delete_inode	= hpfs_delete_inode,
-	.put_super	= hpfs_put_super,
-	.statfs		= hpfs_statfs,
-	.remount_fs	= hpfs_remount_fs,
-};
-
 /*
  * A tiny parser for option strings, stolen from dosfs.
  * Stolen again from read-only hpfs.
@@ -397,7 +383,7 @@ HPFS filesystem options:\n\
 \n");
 }
 
-int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
+static int hpfs_remount_fs(struct super_block *s, int *flags, char *data)
 {
 	uid_t uid;
 	gid_t gid;
@@ -441,6 +427,18 @@ int hpfs_remount_fs(struct super_block *
 	return 0;
 }
 
+/* Super operations */
+
+static struct super_operations hpfs_sops =
+{
+	.alloc_inode	= hpfs_alloc_inode,
+	.destroy_inode	= hpfs_destroy_inode,
+	.delete_inode	= hpfs_delete_inode,
+	.put_super	= hpfs_put_super,
+	.statfs		= hpfs_statfs,
+	.remount_fs	= hpfs_remount_fs,
+};
+
 static int hpfs_fill_super(struct super_block *s, void *options, int silent)
 {
 	struct buffer_head *bh0, *bh1, *bh2;
diff -puN -L include/linux/hpfs_fs_i.h include/linux/hpfs_fs_i.h~HPFS7-hpfs_cleanup2-RC4-rc1 /dev/null
--- 25/include/linux/hpfs_fs_i.h
+++ /dev/null	2002-08-30 16:31:37.000000000 -0700
@@ -1,25 +0,0 @@
-#ifndef _HPFS_FS_I
-#define _HPFS_FS_I
-
-struct hpfs_inode_info {
-	loff_t mmu_private;
-	ino_t i_parent_dir;	/* (directories) gives fnode of parent dir */
-	unsigned i_dno;		/* (directories) root dnode */
-	unsigned i_dpos;	/* (directories) temp for readdir */
-	unsigned i_dsubdno;	/* (directories) temp for readdir */
-	unsigned i_file_sec;	/* (files) minimalist cache of alloc info */
-	unsigned i_disk_sec;	/* (files) minimalist cache of alloc info */
-	unsigned i_n_secs;	/* (files) minimalist cache of alloc info */
-	unsigned i_ea_size;	/* size of extended attributes */
-	unsigned i_conv : 2;	/* (files) crlf->newline hackery */
-	unsigned i_ea_mode : 1;	/* file's permission is stored in ea */
-	unsigned i_ea_uid : 1;	/* file's uid is stored in ea */
-	unsigned i_ea_gid : 1;	/* file's gid is stored in ea */
-	unsigned i_dirty : 1;
-	struct rw_semaphore i_sem;
-	struct semaphore i_parent;
-	loff_t **i_rddir_off;
-	struct inode vfs_inode;
-};
-
-#endif
diff -puN -L include/linux/hpfs_fs_sb.h include/linux/hpfs_fs_sb.h~HPFS7-hpfs_cleanup2-RC4-rc1 /dev/null
--- 25/include/linux/hpfs_fs_sb.h
+++ /dev/null	2002-08-30 16:31:37.000000000 -0700
@@ -1,34 +0,0 @@
-#ifndef _HPFS_FS_SB
-#define _HPFS_FS_SB
-
-struct hpfs_sb_info {
-	ino_t sb_root;			/* inode number of root dir */
-	unsigned sb_fs_size;		/* file system size, sectors */
-	unsigned sb_bitmaps;		/* sector number of bitmap list */
-	unsigned sb_dirband_start;	/* directory band start sector */
-	unsigned sb_dirband_size;	/* directory band size, dnodes */
-	unsigned sb_dmap;		/* sector number of dnode bit map */
-	unsigned sb_n_free;		/* free blocks for statfs, or -1 */
-	unsigned sb_n_free_dnodes;	/* free dnodes for statfs, or -1 */
-	uid_t sb_uid;			/* uid from mount options */
-	gid_t sb_gid;			/* gid from mount options */
-	umode_t sb_mode;		/* mode from mount options */
-	unsigned sb_conv : 2;		/* crlf->newline hackery */
-	unsigned sb_eas : 2;		/* eas: 0-ignore, 1-ro, 2-rw */
-	unsigned sb_err : 2;		/* on errs: 0-cont, 1-ro, 2-panic */
-	unsigned sb_chk : 2;		/* checks: 0-no, 1-normal, 2-strict */
-	unsigned sb_lowercase : 1;	/* downcase filenames hackery */
-	unsigned sb_was_error : 1;	/* there was an error, set dirty flag */
-	unsigned sb_chkdsk : 2;		/* chkdsk: 0-no, 1-on errs, 2-allways */
-	unsigned char *sb_cp_table;	/* code page tables: */
-					/* 	128 bytes uppercasing table & */
-					/*	128 bytes lowercasing table */
-	unsigned *sb_bmp_dir;		/* main bitmap directory */
-	unsigned sb_c_bitmap;		/* current bitmap */
-	struct semaphore hpfs_creation_de; /* when creating dirents, nobody else
-					   can alloc blocks */
-	/*unsigned sb_mounting : 1;*/
-	int sb_timeshift;
-};
-
-#endif

_