Commit bd54766e authored by David Sterba's avatar David Sterba

btrfs: pass btrfs_inode to btrfs_clear_delalloc_extent

The function is for internal interfaces so we should use the
btrfs_inode.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 62798a49
...@@ -473,7 +473,7 @@ struct inode *btrfs_new_subvol_inode(struct user_namespace *mnt_userns, ...@@ -473,7 +473,7 @@ struct inode *btrfs_new_subvol_inode(struct user_namespace *mnt_userns,
struct inode *dir); struct inode *dir);
void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *state, void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *state,
u32 bits); u32 bits);
void btrfs_clear_delalloc_extent(struct inode *inode, void btrfs_clear_delalloc_extent(struct btrfs_inode *inode,
struct extent_state *state, u32 bits); struct extent_state *state, u32 bits);
void btrfs_merge_delalloc_extent(struct btrfs_inode *inode, struct extent_state *new, void btrfs_merge_delalloc_extent(struct btrfs_inode *inode, struct extent_state *new,
struct extent_state *other); struct extent_state *other);
......
...@@ -509,7 +509,7 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree, ...@@ -509,7 +509,7 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree,
int ret; int ret;
if (tree->inode) if (tree->inode)
btrfs_clear_delalloc_extent(&tree->inode->vfs_inode, state, bits); btrfs_clear_delalloc_extent(tree->inode, state, bits);
ret = add_extent_changeset(state, bits_to_clear, changeset, 0); ret = add_extent_changeset(state, bits_to_clear, changeset, 0);
BUG_ON(ret < 0); BUG_ON(ret < 0);
......
...@@ -2471,11 +2471,10 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s ...@@ -2471,11 +2471,10 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s
* Once a range is no longer delalloc this function ensures that proper * Once a range is no longer delalloc this function ensures that proper
* accounting happens. * accounting happens.
*/ */
void btrfs_clear_delalloc_extent(struct inode *vfs_inode, void btrfs_clear_delalloc_extent(struct btrfs_inode *inode,
struct extent_state *state, u32 bits) struct extent_state *state, u32 bits)
{ {
struct btrfs_inode *inode = BTRFS_I(vfs_inode); struct btrfs_fs_info *fs_info = inode->root->fs_info;
struct btrfs_fs_info *fs_info = btrfs_sb(vfs_inode->i_sb);
u64 len = state->end + 1 - state->start; u64 len = state->end + 1 - state->start;
u32 num_extents = count_max_extents(fs_info, len); u32 num_extents = count_max_extents(fs_info, len);
......
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