mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
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:
+3
-7
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user