aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-09-23 18:07:35 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-09-23 18:07:35 -0400
commit5e8814f2f74f53d58aa5679bf32b38a7940033fe (patch)
tree05f70d1d57d20111a57cd35fb971e36f836d24e8 /fs/ext4/ext4.h
parent9f6200bbfc962d8f926278cf5d5ddb90a228c322 (diff)
ext4: Combine proc file handling into a single set of functions
Previously mballoc created a separate set of functions for each proc file. This combines the tunables into a single set of functions which gets used for all of the per-superblock proc files, saving approximately 2k of compiled object code. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index b9c9371d8164..163c44527dde 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -957,6 +957,22 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
957 957
958extern struct proc_dir_entry *ext4_proc_root; 958extern struct proc_dir_entry *ext4_proc_root;
959 959
960#ifdef CONFIG_PROC_FS
961extern const struct file_operations ext4_ui_proc_fops;
962
963#define EXT4_PROC_HANDLER(name, var) \
964do { \
965 proc = proc_create_data(name, mode, sbi->s_proc, \
966 &ext4_ui_proc_fops, &sbi->s_##var); \
967 if (proc == NULL) { \
968 printk(KERN_ERR "EXT4-fs: can't create %s\n", name); \
969 goto err_out; \
970 } \
971} while (0)
972#else
973#define EXT4_PROC_HANDLER(name, var)
974#endif
975
960/* 976/*
961 * Function prototypes 977 * Function prototypes
962 */ 978 */