Skip to contentSkip to conversation

fs/ext3/: possible cleanups

PATCH New Adrian Bunk 1 participant 1 message Jan 6, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ext3/: possible cleanups

The patch below contains the following cleanups:
- make some needlessly global code static
- super.c: remove the unused global function ext3_panic

Please comment ib whether this patch is correct or conflicts with pending changes.

diffstat output:

 fs/ext3/balloc.c         |    2 
 fs/ext3/dir.c            |    2 
 fs/ext3/inode.c          |    4 
 fs/ext3/resize.c         |    4 
 fs/ext3/super.c          |   45 ++-----
 fs/ext3/xattr.c          |  242 +++++++++++++++++++--------------------
 fs/ext3/xattr.h          |    8 -
 include/linux/ext3_fs.h  |   10 -
 include/linux/ext3_jbd.h |    2 
 9 files changed, 143 insertions(+), 176 deletions(-)
fs/ext3/balloc.c renamed from fs/ext3/balloc.c.old +1 -1
@@ -1451,7 +1451,7 @@
 	}
 }
 
-int ext3_group_sparse(int group)
+static int ext3_group_sparse(int group)
 {
 	return (test_root(group, 3) || test_root(group, 5) ||
 		test_root(group, 7));
fs/ext3/dir.c renamed from fs/ext3/dir.c.old +1 -1
@@ -306,7 +306,7 @@
 }
 
 
-struct dir_private_info *create_dir_info(loff_t pos)
+static struct dir_private_info *create_dir_info(loff_t pos)
 {
 	struct dir_private_info *p;
 
include/linux/ext3_jbd.h renamed from include/linux/ext3_jbd.h.old +0 -2
@@ -46,8 +46,6 @@
 					 EXT3_XATTR_TRANS_BLOCKS - 2 + \
 					 2*EXT3_QUOTA_TRANS_BLOCKS)
 
-extern int ext3_writepage_trans_blocks(struct inode *inode);
-
 /* Delete operations potentially hit one directory's namespace plus an
  * entire inode, plus arbitrary amounts of bitmap/indirection data.  Be
  * generous.  We can grow the delete transaction later if necessary. */
fs/ext3/inode.c renamed from fs/ext3/inode.c.old +3 -1
@@ -39,6 +39,8 @@
 #include "xattr.h"
 #include "acl.h"
 
+static int ext3_writepage_trans_blocks(struct inode *inode);
+
 /*
  * Test whether an inode is a fast symlink.
  */
@@ -2807,7 +2809,7 @@
  * block and work out the exact number of indirects which are touched.  Pah.
  */
 
-int ext3_writepage_trans_blocks(struct inode *inode)
+static int ext3_writepage_trans_blocks(struct inode *inode)
 {
 	int bpp = ext3_journal_blocks_per_page(inode);
 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
fs/ext3/resize.c renamed from fs/ext3/resize.c.old +2 -2
@@ -285,8 +285,8 @@
  * sequence of powers of 3, 5, and 7: 1, 3, 5, 7, 9, 25, 27, 49, 81, ...
  * For a non-sparse filesystem it will be every group: 1, 2, 3, 4, ...
  */
-unsigned ext3_list_backups(struct super_block *sb, unsigned *three,
-			   unsigned *five, unsigned *seven)
+static unsigned ext3_list_backups(struct super_block *sb, unsigned *three,
+				  unsigned *five, unsigned *seven)
 {
 	unsigned *min = three;
 	int mult = 3;
include/linux/ext3_fs.h renamed from include/linux/ext3_fs.h.old +0 -10
@@ -793,25 +793,15 @@
 extern void __ext3_std_error (struct super_block *, const char *, int);
 extern void ext3_abort (struct super_block *, const char *, const char *, ...)
 	__attribute__ ((format (printf, 3, 4)));
-extern NORET_TYPE void ext3_panic (struct super_block *, const char *,
-				   const char *, ...)
-	__attribute__ ((NORET_AND format (printf, 3, 4)));
 extern void ext3_warning (struct super_block *, const char *, const char *, ...)
 	__attribute__ ((format (printf, 3, 4)));
 extern void ext3_update_dynamic_rev (struct super_block *sb);
-extern void ext3_put_super (struct super_block *);
-extern void ext3_write_super (struct super_block *);
-extern void ext3_write_super_lockfs (struct super_block *);
-extern void ext3_unlockfs (struct super_block *);
-extern int ext3_remount (struct super_block *, int *, char *);
-extern int ext3_statfs (struct super_block *, struct kstatfs *);
 
 #define ext3_std_error(sb, errno)				\
 do {								\
 	if ((errno))						\
 		__ext3_std_error((sb), __FUNCTION__, (errno));	\
 } while (0)
-extern const char *ext3_decode_error(struct super_block *sb, int errno, char nbuf[16]);
 
 /*
  * Inodes and files operations
fs/ext3/super.c renamed from fs/ext3/super.c.old +15 -30

99 lines not on this page · raw message

fs/ext3/xattr.h renamed from fs/ext3/xattr.h.old +0 -8
@@ -65,10 +65,8 @@
 extern ssize_t ext3_listxattr(struct dentry *, char *, size_t);
 
 extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
-extern int ext3_xattr_list(struct inode *, char *, size_t);
 extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
 extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
-extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
 
 extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
 extern void ext3_xattr_put_super(struct super_block *);
@@ -88,12 +86,6 @@
 }
 
 static inline int
-ext3_xattr_list(struct inode *inode, void *buffer, size_t size)
-{
-	return -EOPNOTSUPP;
-}
-
-static inline int
 ext3_xattr_set(struct inode *inode, int name_index, const char *name,
 	       const void *value, size_t size, int flags)
 {
fs/ext3/xattr.c renamed from fs/ext3/xattr.c.old +121 -121

316 lines not on this page · raw message