Skip to content

Commit 585ab69

Browse files
committed
btrfs: uninline btrfs_init_delayed_root()
This is a simple initializer and not on any hot path, it does not need to be static inline. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 2aa756e commit 585ab69

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

fs/btrfs/delayed-inode.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ void __cold btrfs_delayed_inode_exit(void)
4343
kmem_cache_destroy(delayed_node_cache);
4444
}
4545

46+
void btrfs_init_delayed_root(struct btrfs_delayed_root *delayed_root)
47+
{
48+
atomic_set(&delayed_root->items, 0);
49+
atomic_set(&delayed_root->items_seq, 0);
50+
delayed_root->nodes = 0;
51+
spin_lock_init(&delayed_root->lock);
52+
init_waitqueue_head(&delayed_root->wait);
53+
INIT_LIST_HEAD(&delayed_root->node_list);
54+
INIT_LIST_HEAD(&delayed_root->prepare_list);
55+
}
56+
4657
static inline void btrfs_init_delayed_node(
4758
struct btrfs_delayed_node *delayed_node,
4859
struct btrfs_root *root, u64 inode_id)

fs/btrfs/delayed-inode.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,7 @@ struct btrfs_delayed_item {
106106
char data[] __counted_by(data_len);
107107
};
108108

109-
static inline void btrfs_init_delayed_root(
110-
struct btrfs_delayed_root *delayed_root)
111-
{
112-
atomic_set(&delayed_root->items, 0);
113-
atomic_set(&delayed_root->items_seq, 0);
114-
delayed_root->nodes = 0;
115-
spin_lock_init(&delayed_root->lock);
116-
init_waitqueue_head(&delayed_root->wait);
117-
INIT_LIST_HEAD(&delayed_root->node_list);
118-
INIT_LIST_HEAD(&delayed_root->prepare_list);
119-
}
120-
109+
void btrfs_init_delayed_root(struct btrfs_delayed_root *delayed_root);
121110
int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans,
122111
const char *name, int name_len,
123112
struct btrfs_inode *dir,

0 commit comments

Comments
 (0)