btrfs: merge btrfs_printk_ratelimited() and its only caller

There's only one caller of btrfs_printk_ratelimited(), merge it there.

Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2025-06-09 19:09:31 +02:00
parent 2f3f1ad7f1
commit b37532bffd

View File

@@ -86,19 +86,15 @@ do { \
rcu_read_unlock(); \
} while (0)
#define btrfs_printk_ratelimited(fs_info, fmt, args...) \
#define btrfs_printk_rl_in_rcu(fs_info, fmt, args...) \
do { \
static DEFINE_RATELIMIT_STATE(_rs, \
DEFAULT_RATELIMIT_INTERVAL, \
DEFAULT_RATELIMIT_BURST); \
\
rcu_read_lock(); \
if (__ratelimit(&_rs)) \
btrfs_printk(fs_info, fmt, ##args); \
} while (0)
#define btrfs_printk_rl_in_rcu(fs_info, fmt, args...) \
do { \
rcu_read_lock(); \
btrfs_printk_ratelimited(fs_info, fmt, ##args); \
rcu_read_unlock(); \
} while (0)