diff options
author | Josef Bacik <josef@toxicpanda.com> | 2023-04-29 16:07:19 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-06-19 13:59:25 +0200 |
commit | a95b7f93602e41f680096106935a76667a8763f1 (patch) | |
tree | a6c130cb4360bd08135c9aa095246ade2c8153fc /fs | |
parent | f541833c8eea17e3779e0fce81d3c92a3604d80a (diff) |
btrfs: add __KERNEL__ check for btrfs_no_printk
We want to override this in btrfs-progs, so wrap this in the __KERNEL__
check so we can easily sync this to btrfs-progs and have our local
version of btrfs_no_printk do the work.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/messages.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/messages.h b/fs/btrfs/messages.h index ac2d1982ba3d..99143bbf78a5 100644 --- a/fs/btrfs/messages.h +++ b/fs/btrfs/messages.h @@ -7,11 +7,18 @@ struct btrfs_fs_info; +/* + * We want to be able to override this in btrfs-progs. + */ +#ifdef __KERNEL__ + static inline __printf(2, 3) __cold void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...) { } +#endif + #ifdef CONFIG_PRINTK #define btrfs_printk(fs_info, fmt, args...) \ |