Skip to content

Commit 2be1f2b

Browse files
committed
btrfs: drop static inline specifiers from tree-mod-log.c
Using static inline in a .c file should be justified, e.g. when functions are on a hot path but none of the affected functions seem to be. As it's all in one compilation unit let the compiler decide. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 585ab69 commit 2be1f2b

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

fs/btrfs/tree-mod-log.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct tree_mod_elem {
4444
/*
4545
* Pull a new tree mod seq number for our operation.
4646
*/
47-
static inline u64 btrfs_inc_tree_mod_seq(struct btrfs_fs_info *fs_info)
47+
static u64 btrfs_inc_tree_mod_seq(struct btrfs_fs_info *fs_info)
4848
{
4949
return atomic64_inc_return(&fs_info->tree_mod_seq);
5050
}
@@ -170,8 +170,7 @@ static noinline int tree_mod_log_insert(struct btrfs_fs_info *fs_info,
170170
* this until all tree mod log insertions are recorded in the rb tree and then
171171
* write unlock fs_info::tree_mod_log_lock.
172172
*/
173-
static inline bool tree_mod_dont_log(struct btrfs_fs_info *fs_info,
174-
struct extent_buffer *eb)
173+
static bool tree_mod_dont_log(struct btrfs_fs_info *fs_info, struct extent_buffer *eb)
175174
{
176175
if (!test_bit(BTRFS_FS_TREE_MOD_LOG_USERS, &fs_info->flags))
177176
return true;
@@ -188,7 +187,7 @@ static inline bool tree_mod_dont_log(struct btrfs_fs_info *fs_info,
188187
}
189188

190189
/* Similar to tree_mod_dont_log, but doesn't acquire any locks. */
191-
static inline bool tree_mod_need_log(const struct btrfs_fs_info *fs_info,
190+
static bool tree_mod_need_log(const struct btrfs_fs_info *fs_info,
192191
struct extent_buffer *eb)
193192
{
194193
if (!test_bit(BTRFS_FS_TREE_MOD_LOG_USERS, &fs_info->flags))
@@ -367,9 +366,9 @@ int btrfs_tree_mod_log_insert_move(struct extent_buffer *eb,
367366
return ret;
368367
}
369368

370-
static inline int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
371-
struct tree_mod_elem **tm_list,
372-
int nritems)
369+
static int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
370+
struct tree_mod_elem **tm_list,
371+
int nritems)
373372
{
374373
int i, j;
375374
int ret;

0 commit comments

Comments
 (0)