Commit 23408d81 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: remove is_data_inode() checks in extent-io-tree.c

We're only initializing extent_io_tree's with a private data if we're a
normal inode, so we don't need this extra check.
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent efb0645b
...@@ -60,7 +60,7 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller, ...@@ -60,7 +60,7 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller,
struct inode *inode = tree->private_data; struct inode *inode = tree->private_data;
u64 isize; u64 isize;
if (!inode || !is_data_inode(inode)) if (!inode)
return; return;
isize = i_size_read(inode); isize = i_size_read(inode);
...@@ -346,7 +346,7 @@ static void merge_state(struct extent_io_tree *tree, struct extent_state *state) ...@@ -346,7 +346,7 @@ static void merge_state(struct extent_io_tree *tree, struct extent_state *state)
other = prev_state(state); other = prev_state(state);
if (other && other->end == state->start - 1 && if (other && other->end == state->start - 1 &&
other->state == state->state) { other->state == state->state) {
if (tree->private_data && is_data_inode(tree->private_data)) if (tree->private_data)
btrfs_merge_delalloc_extent(tree->private_data, btrfs_merge_delalloc_extent(tree->private_data,
state, other); state, other);
state->start = other->start; state->start = other->start;
...@@ -357,7 +357,7 @@ static void merge_state(struct extent_io_tree *tree, struct extent_state *state) ...@@ -357,7 +357,7 @@ static void merge_state(struct extent_io_tree *tree, struct extent_state *state)
other = next_state(state); other = next_state(state);
if (other && other->start == state->end + 1 && if (other && other->start == state->end + 1 &&
other->state == state->state) { other->state == state->state) {
if (tree->private_data && is_data_inode(tree->private_data)) if (tree->private_data)
btrfs_merge_delalloc_extent(tree->private_data, state, btrfs_merge_delalloc_extent(tree->private_data, state,
other); other);
state->end = other->end; state->end = other->end;
...@@ -374,7 +374,7 @@ static void set_state_bits(struct extent_io_tree *tree, ...@@ -374,7 +374,7 @@ static void set_state_bits(struct extent_io_tree *tree,
u32 bits_to_set = bits & ~EXTENT_CTLBITS; u32 bits_to_set = bits & ~EXTENT_CTLBITS;
int ret; int ret;
if (tree->private_data && is_data_inode(tree->private_data)) if (tree->private_data)
btrfs_set_delalloc_extent(tree->private_data, state, bits); btrfs_set_delalloc_extent(tree->private_data, state, bits);
ret = add_extent_changeset(state, bits_to_set, changeset, 1); ret = add_extent_changeset(state, bits_to_set, changeset, 1);
...@@ -462,7 +462,7 @@ static int split_state(struct extent_io_tree *tree, struct extent_state *orig, ...@@ -462,7 +462,7 @@ static int split_state(struct extent_io_tree *tree, struct extent_state *orig,
struct rb_node *parent = NULL; struct rb_node *parent = NULL;
struct rb_node **node; struct rb_node **node;
if (tree->private_data && is_data_inode(tree->private_data)) if (tree->private_data)
btrfs_split_delalloc_extent(tree->private_data, orig, split); btrfs_split_delalloc_extent(tree->private_data, orig, split);
prealloc->start = orig->start; prealloc->start = orig->start;
...@@ -510,7 +510,7 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree, ...@@ -510,7 +510,7 @@ static struct extent_state *clear_state_bit(struct extent_io_tree *tree,
u32 bits_to_clear = bits & ~EXTENT_CTLBITS; u32 bits_to_clear = bits & ~EXTENT_CTLBITS;
int ret; int ret;
if (tree->private_data && is_data_inode(tree->private_data)) if (tree->private_data)
btrfs_clear_delalloc_extent(tree->private_data, state, bits); btrfs_clear_delalloc_extent(tree->private_data, state, bits);
ret = add_extent_changeset(state, bits_to_clear, changeset, 0); ret = add_extent_changeset(state, bits_to_clear, changeset, 0);
......
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