Commit 585ab692 authored by David Sterba's avatar David Sterba

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: default avatarDavid Sterba <dsterba@suse.com>
parent 2aa756ec
...@@ -43,6 +43,17 @@ void __cold btrfs_delayed_inode_exit(void) ...@@ -43,6 +43,17 @@ void __cold btrfs_delayed_inode_exit(void)
kmem_cache_destroy(delayed_node_cache); kmem_cache_destroy(delayed_node_cache);
} }
void btrfs_init_delayed_root(struct btrfs_delayed_root *delayed_root)
{
atomic_set(&delayed_root->items, 0);
atomic_set(&delayed_root->items_seq, 0);
delayed_root->nodes = 0;
spin_lock_init(&delayed_root->lock);
init_waitqueue_head(&delayed_root->wait);
INIT_LIST_HEAD(&delayed_root->node_list);
INIT_LIST_HEAD(&delayed_root->prepare_list);
}
static inline void btrfs_init_delayed_node( static inline void btrfs_init_delayed_node(
struct btrfs_delayed_node *delayed_node, struct btrfs_delayed_node *delayed_node,
struct btrfs_root *root, u64 inode_id) struct btrfs_root *root, u64 inode_id)
......
...@@ -106,18 +106,7 @@ struct btrfs_delayed_item { ...@@ -106,18 +106,7 @@ struct btrfs_delayed_item {
char data[] __counted_by(data_len); char data[] __counted_by(data_len);
}; };
static inline void btrfs_init_delayed_root( void btrfs_init_delayed_root(struct btrfs_delayed_root *delayed_root);
struct btrfs_delayed_root *delayed_root)
{
atomic_set(&delayed_root->items, 0);
atomic_set(&delayed_root->items_seq, 0);
delayed_root->nodes = 0;
spin_lock_init(&delayed_root->lock);
init_waitqueue_head(&delayed_root->wait);
INIT_LIST_HEAD(&delayed_root->node_list);
INIT_LIST_HEAD(&delayed_root->prepare_list);
}
int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans,
const char *name, int name_len, const char *name, int name_len,
struct btrfs_inode *dir, struct btrfs_inode *dir,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment