aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-01 08:12:37 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-07-01 08:12:37 -0400
commite7c96e8e47baf263d93a8dbbebca7216a912ca05 (patch)
treecec5ac7a66589437fe64708eb854fdc8b33250b7 /fs/ext4/super.c
parentd3922a777f9b4c4df898d326fa940f239af4f9b6 (diff)
ext4: reduce object size when !CONFIG_PRINTK
Reduce the object size ~10% could be useful for embedded systems. Add #ifdef CONFIG_PRINTK #else #endif blocks to hold formats and arguments, passing " " to functions when !CONFIG_PRINTK and still verifying format and arguments with no_printk. $ size fs/ext4/built-in.o* text data bss dec hex filename 239375 610 888 240873 3ace9 fs/ext4/built-in.o.new 264167 738 888 265793 40e41 fs/ext4/built-in.o.old $ grep -E "CONFIG_EXT4|CONFIG_PRINTK" .config # CONFIG_PRINTK is not set CONFIG_EXT4_FS=y CONFIG_EXT4_USE_FOR_EXT23=y CONFIG_EXT4_FS_POSIX_ACL=y # CONFIG_EXT4_FS_SECURITY is not set # CONFIG_EXT4_DEBUG is not set Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index cc8201180b30..85b3dd60169b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -428,9 +428,9 @@ void __ext4_error(struct super_block *sb, const char *function,
428 ext4_handle_error(sb); 428 ext4_handle_error(sb);
429} 429}
430 430
431void ext4_error_inode(struct inode *inode, const char *function, 431void __ext4_error_inode(struct inode *inode, const char *function,
432 unsigned int line, ext4_fsblk_t block, 432 unsigned int line, ext4_fsblk_t block,
433 const char *fmt, ...) 433 const char *fmt, ...)
434{ 434{
435 va_list args; 435 va_list args;
436 struct va_format vaf; 436 struct va_format vaf;
@@ -457,9 +457,9 @@ void ext4_error_inode(struct inode *inode, const char *function,
457 ext4_handle_error(inode->i_sb); 457 ext4_handle_error(inode->i_sb);
458} 458}
459 459
460void ext4_error_file(struct file *file, const char *function, 460void __ext4_error_file(struct file *file, const char *function,
461 unsigned int line, ext4_fsblk_t block, 461 unsigned int line, ext4_fsblk_t block,
462 const char *fmt, ...) 462 const char *fmt, ...)
463{ 463{
464 va_list args; 464 va_list args;
465 struct va_format vaf; 465 struct va_format vaf;
@@ -591,7 +591,8 @@ void __ext4_abort(struct super_block *sb, const char *function,
591 panic("EXT4-fs panic from previous error\n"); 591 panic("EXT4-fs panic from previous error\n");
592} 592}
593 593
594void ext4_msg(struct super_block *sb, const char *prefix, const char *fmt, ...) 594void __ext4_msg(struct super_block *sb,
595 const char *prefix, const char *fmt, ...)
595{ 596{
596 struct va_format vaf; 597 struct va_format vaf;
597 va_list args; 598 va_list args;