diff options
| author | David Sterba <dsterba@suse.com> | 2025-06-09 19:09:21 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-07-21 23:56:38 +0200 |
| commit | d1d1c854270ae21c2c770ac42591558b6511578e (patch) | |
| tree | e6cc939ab13b35b2eecc58b315863c0a31fa5a76 /fs/btrfs/rcu-string.h | |
| parent | 694ce5e143d67267ad26b04463e790a597500b00 (diff) | |
btrfs: open code rcu_string_free() and remove it
The helper is trivial and we can simply use kfree_rcu() if needed. In
our case it's just one place where we rename a device in
device_list_add() and the old name can still be used until the end of
the RCU grace period. The other case is freeing a device and there
nothing should reach the device, so we can use plain kfree().
Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/rcu-string.h')
| -rw-r--r-- | fs/btrfs/rcu-string.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/btrfs/rcu-string.h b/fs/btrfs/rcu-string.h index 1c2d7cb1fe6f..7f35cf75b50f 100644 --- a/fs/btrfs/rcu-string.h +++ b/fs/btrfs/rcu-string.h @@ -32,12 +32,6 @@ static inline struct rcu_string *rcu_string_strdup(const char *src, gfp_t mask) return ret; } -static inline void rcu_string_free(struct rcu_string *str) -{ - if (str) - kfree_rcu(str, rcu); -} - #define printk_in_rcu(fmt, ...) do { \ rcu_read_lock(); \ printk(fmt, __VA_ARGS__); \ |