Commit f5cc7b80 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Make btrfs_inode_delayed_dir_index_count take btrfs_inode

Signed-off-by: default avatarNikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 5f4b32e9
......@@ -1556,9 +1556,9 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
return ret;
}
int btrfs_inode_delayed_dir_index_count(struct inode *inode)
int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode)
{
struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(BTRFS_I(inode));
struct btrfs_delayed_node *delayed_node = btrfs_get_delayed_node(inode);
if (!delayed_node)
return -ENOENT;
......@@ -1573,7 +1573,7 @@ int btrfs_inode_delayed_dir_index_count(struct inode *inode)
return -EINVAL;
}
BTRFS_I(inode)->index_cnt = delayed_node->index_cnt;
inode->index_cnt = delayed_node->index_cnt;
btrfs_release_delayed_node(delayed_node);
return 0;
}
......
......@@ -109,7 +109,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
struct btrfs_inode *dir, u64 index);
int btrfs_inode_delayed_dir_index_count(struct inode *inode);
int btrfs_inode_delayed_dir_index_count(struct btrfs_inode *inode);
int btrfs_run_delayed_items(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info);
......
......@@ -6103,7 +6103,7 @@ int btrfs_set_inode_index(struct inode *dir, u64 *index)
int ret = 0;
if (BTRFS_I(dir)->index_cnt == (u64)-1) {
ret = btrfs_inode_delayed_dir_index_count(dir);
ret = btrfs_inode_delayed_dir_index_count(BTRFS_I(dir));
if (ret) {
ret = btrfs_set_inode_index_count(dir);
if (ret)
......
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