btrfs: remove unused rcu-string printk helpers
authorDavid Sterba <dsterba@suse.com>
Mon, 9 Jun 2025 17:09:22 +0000 (19:09 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:56:38 +0000 (23:56 +0200)
The RCU-string API has never taken off and we don't use the printk
helpers provided as we do the protection in our helpers. Remove the "in
RCU" wrappers.

Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/messages.h
fs/btrfs/rcu-string.h

index 6abf81bb00c2fe24059c776cbe4377c88bab2a21..12d798802a010f2f08f1ed8fb16e0b166000193c 100644 (file)
@@ -53,7 +53,7 @@ void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
        btrfs_printk(fs_info, KERN_INFO fmt, ##args)
 
 /*
- * Wrappers that use printk_in_rcu
+ * Wrappers that use printk in RCU
  */
 #define btrfs_emerg_in_rcu(fs_info, fmt, args...) \
        btrfs_printk_in_rcu(fs_info, KERN_EMERG fmt, ##args)
@@ -71,7 +71,7 @@ void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
        btrfs_printk_in_rcu(fs_info, KERN_INFO fmt, ##args)
 
 /*
- * Wrappers that use a ratelimited printk_in_rcu
+ * Wrappers that use a ratelimited printk in RCU
  */
 #define btrfs_emerg_rl_in_rcu(fs_info, fmt, args...) \
        btrfs_printk_rl_in_rcu(fs_info, KERN_EMERG fmt, ##args)
index 7f35cf75b50ff3d5b551fd43655e7305d5ee994e..70b1e19b50e666a597a56ce79a38b47b1d6be03c 100644 (file)
@@ -32,18 +32,6 @@ static inline struct rcu_string *rcu_string_strdup(const char *src, gfp_t mask)
        return ret;
 }
 
-#define printk_in_rcu(fmt, ...) do {   \
-       rcu_read_lock();                \
-       printk(fmt, __VA_ARGS__);       \
-       rcu_read_unlock();              \
-} while (0)
-
-#define printk_ratelimited_in_rcu(fmt, ...) do {       \
-       rcu_read_lock();                                \
-       printk_ratelimited(fmt, __VA_ARGS__);           \
-       rcu_read_unlock();                              \
-} while (0)
-
 #define rcu_str_deref(rcu_str) ({                              \
        struct rcu_string *__str = rcu_dereference(rcu_str);    \
        __str->str;                                             \