summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-12-16 03:46:54 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 18:20:06 +0300
commite3c96f53ac132743fda1384910feb863a2eab916 (patch)
tree48b97fdf50897d5ee97409db86bd4e4d7220be03 /include
parent904e812931f001b984912b2d2f653ea69520313c (diff)
downloadlinux-e3c96f53ac132743fda1384910feb863a2eab916.tar.xz
reiserfs: don't compile procfs.o at all if no support
* small define cleanup in header * fix #ifdeffery in procfs.c via Kconfig Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/reiserfs_fs.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index f65ed0d3a920..c96c1858fe2c 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -2051,21 +2051,13 @@ void set_de_name_and_namelen(struct reiserfs_dir_entry *de);
int search_by_entry_key(struct super_block *sb, const struct cpu_key *key,
struct treepath *path, struct reiserfs_dir_entry *de);
struct dentry *reiserfs_get_parent(struct dentry *);
-/* procfs.c */
-
-#if defined( CONFIG_PROC_FS ) && defined( CONFIG_REISERFS_PROC_INFO )
-#define REISERFS_PROC_INFO
-#else
-#undef REISERFS_PROC_INFO
-#endif
+#ifdef CONFIG_REISERFS_PROC_INFO
int reiserfs_proc_info_init(struct super_block *sb);
int reiserfs_proc_info_done(struct super_block *sb);
int reiserfs_proc_info_global_init(void);
int reiserfs_proc_info_global_done(void);
-#if defined( REISERFS_PROC_INFO )
-
#define PROC_EXP( e ) e
#define __PINFO( sb ) REISERFS_SB(sb) -> s_proc_info_data
@@ -2079,6 +2071,26 @@ int reiserfs_proc_info_global_done(void);
PROC_INFO_ADD( sb, free_at[ ( level ) ], B_FREE_SPACE( bh ) ); \
PROC_INFO_ADD( sb, items_at[ ( level ) ], B_NR_ITEMS( bh ) )
#else
+static inline int reiserfs_proc_info_init(struct super_block *sb)
+{
+ return 0;
+}
+
+static inline int reiserfs_proc_info_done(struct super_block *sb)
+{
+ return 0;
+}
+
+static inline int reiserfs_proc_info_global_init(void)
+{
+ return 0;
+}
+
+static inline int reiserfs_proc_info_global_done(void)
+{
+ return 0;
+}
+
#define PROC_EXP( e )
#define VOID_V ( ( void ) 0 )
#define PROC_INFO_MAX( sb, field, value ) VOID_V