Browse Source

[PATCH] fs/ext3/: small cleanups

This patch contains the following cleanups:
- there's no need for ext3_count_free() #ifndef EXT3FS_DEBUG
- having prototypes for ext3_count_free() in two different headers is
  nonsense

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk 19 years ago
parent
commit
3af13763d6
4 changed files with 7 additions and 12 deletions
  1. 0 2
      fs/ext3/balloc.c
  2. 7 1
      fs/ext3/bitmap.c
  3. 0 8
      fs/ext3/bitmap.h
  4. 0 1
      fs/ext3/ialloc.c

+ 0 - 2
fs/ext3/balloc.c

@@ -20,8 +20,6 @@
 #include <linux/quotaops.h>
 #include <linux/quotaops.h>
 #include <linux/buffer_head.h>
 #include <linux/buffer_head.h>
 
 
-#include "bitmap.h"
-
 /*
 /*
  * balloc.c contains the blocks allocation and deallocation routines
  * balloc.c contains the blocks allocation and deallocation routines
  */
  */

+ 7 - 1
fs/ext3/bitmap.c

@@ -7,8 +7,11 @@
  * Universite Pierre et Marie Curie (Paris VI)
  * Universite Pierre et Marie Curie (Paris VI)
  */
  */
 
 
+#ifdef EXT3FS_DEBUG
+
 #include <linux/buffer_head.h>
 #include <linux/buffer_head.h>
-#include "bitmap.h"
+
+#include "ext3_fs.h"
 
 
 static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
 static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
 
 
@@ -24,3 +27,6 @@ unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars)
 			nibblemap[(map->b_data[i] >> 4) & 0xf];
 			nibblemap[(map->b_data[i] >> 4) & 0xf];
 	return (sum);
 	return (sum);
 }
 }
+
+#endif  /*  EXT3FS_DEBUG  */
+

+ 0 - 8
fs/ext3/bitmap.h

@@ -1,8 +0,0 @@
-/*  linux/fs/ext3/bitmap.c
- *
- * Copyright (C) 2005 Simtec Electronics
- *	Ben Dooks <ben@simtec.co.uk>
- *
-*/
-
-extern unsigned long ext3_count_free (struct buffer_head *, unsigned int );

+ 0 - 1
fs/ext3/ialloc.c

@@ -26,7 +26,6 @@
 
 
 #include <asm/byteorder.h>
 #include <asm/byteorder.h>
 
 
-#include "bitmap.h"
 #include "xattr.h"
 #include "xattr.h"
 #include "acl.h"
 #include "acl.h"