summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-01 19:57:35 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:52 +0100
commitb105e92755b448efd4800e3415dfeae5ad8054e9 (patch)
treebdc1e8adbd8170d5089ce07eca11e6a1b9901cd3 /fs/btrfs/super.c
parent4c66e0d4243bb8829f2c936e966030d967726e90 (diff)
downloadlinux-b105e92755b448efd4800e3415dfeae5ad8054e9.tar.bz2
btrfs: add __cold attribute to more functions
The attribute can mark functions supposed to be called rarely if at all and the text can be moved to sections far from the other code. The attribute has been added to several functions already, this patch is based on hints given by gcc -Wsuggest-attribute=cold. The net effect of this patch is decrease of btrfs.ko by 1000-1300, depending on the config options. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index c7d78ac64b83..9c0c53e7d0fc 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -187,7 +187,7 @@ static struct ratelimit_state printk_limits[] = {
RATELIMIT_STATE_INIT(printk_limits[7], DEFAULT_RATELIMIT_INTERVAL, 100),
};
-void btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...)
+void __cold btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...)
{
char lvl[PRINTK_MAX_SINGLE_HEADER_LEN + 1] = "\0";
struct va_format vaf;