[PATCH] CONFIG_BLOCK internal.h cleanups
authorAndrew Morton <akpm@osdl.org>
Thu, 31 Aug 2006 10:55:23 +0000 (12:55 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Sat, 30 Sep 2006 18:52:32 +0000 (20:52 +0200)
- forward declare struct superblock
- use inlines, not macros

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/internal.h

index f07147d..ea00126 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <linux/ioctl32.h>
 
+struct super_block;
+
 /*
  * block_dev.c
  */
 extern struct super_block *blockdev_superblock;
 extern void __init bdev_cache_init(void);
 
-#define sb_is_blkdev_sb(sb) ((sb) == blockdev_superblock)
+static inline int sb_is_blkdev_sb(struct super_block *sb)
+{
+       return sb == blockdev_superblock;
+}
+
 #else
-static inline void bdev_cache_init(void) {}
+static inline void bdev_cache_init(void)
+{
+}
 
-#define sb_is_blkdev_sb(sb) 0
+static inline int sb_is_blkdev_sb(struct super_block *sb)
+{
+       return 0;
+}
 #endif
 
 /*