Skip to content

Commit d090516

Browse files
committed
btrfs: remove unused rcu-string printk helpers
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>
1 parent 9fc9a5a commit d090516

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

fs/btrfs/messages.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void _btrfs_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...);
5353
btrfs_printk(fs_info, KERN_INFO fmt, ##args)
5454

5555
/*
56-
* Wrappers that use printk_in_rcu
56+
* Wrappers that use printk in RCU
5757
*/
5858
#define btrfs_emerg_in_rcu(fs_info, fmt, args...) \
5959
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, ...);
7171
btrfs_printk_in_rcu(fs_info, KERN_INFO fmt, ##args)
7272

7373
/*
74-
* Wrappers that use a ratelimited printk_in_rcu
74+
* Wrappers that use a ratelimited printk in RCU
7575
*/
7676
#define btrfs_emerg_rl_in_rcu(fs_info, fmt, args...) \
7777
btrfs_printk_rl_in_rcu(fs_info, KERN_EMERG fmt, ##args)

fs/btrfs/rcu-string.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,6 @@ static inline struct rcu_string *rcu_string_strdup(const char *src, gfp_t mask)
3232
return ret;
3333
}
3434

35-
#define printk_in_rcu(fmt, ...) do { \
36-
rcu_read_lock(); \
37-
printk(fmt, __VA_ARGS__); \
38-
rcu_read_unlock(); \
39-
} while (0)
40-
41-
#define printk_ratelimited_in_rcu(fmt, ...) do { \
42-
rcu_read_lock(); \
43-
printk_ratelimited(fmt, __VA_ARGS__); \
44-
rcu_read_unlock(); \
45-
} while (0)
46-
4735
#define rcu_str_deref(rcu_str) ({ \
4836
struct rcu_string *__str = rcu_dereference(rcu_str); \
4937
__str->str; \

0 commit comments

Comments
 (0)