Commit 4aec05fa authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: remove level argument from btrfs_set_block_flags

We just pass in btrfs_header_level(eb) for the level, and we're passing
in the eb already, so simply get the level from the eb inside of
btrfs_set_block_flags.
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 54d687c1
...@@ -464,10 +464,7 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans, ...@@ -464,10 +464,7 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
return ret; return ret;
} }
if (new_flags != 0) { if (new_flags != 0) {
int level = btrfs_header_level(buf); ret = btrfs_set_disk_extent_flags(trans, buf, new_flags);
ret = btrfs_set_disk_extent_flags(trans, buf,
new_flags, level);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -2152,10 +2152,10 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, ...@@ -2152,10 +2152,10 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
} }
int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans, int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans,
struct extent_buffer *eb, u64 flags, struct extent_buffer *eb, u64 flags)
int level)
{ {
struct btrfs_delayed_extent_op *extent_op; struct btrfs_delayed_extent_op *extent_op;
int level = btrfs_header_level(eb);
int ret; int ret;
extent_op = btrfs_alloc_delayed_extent_op(); extent_op = btrfs_alloc_delayed_extent_op();
...@@ -5095,8 +5095,7 @@ static noinline int walk_down_proc(struct btrfs_trans_handle *trans, ...@@ -5095,8 +5095,7 @@ static noinline int walk_down_proc(struct btrfs_trans_handle *trans,
BUG_ON(ret); /* -ENOMEM */ BUG_ON(ret); /* -ENOMEM */
ret = btrfs_dec_ref(trans, root, eb, 0); ret = btrfs_dec_ref(trans, root, eb, 0);
BUG_ON(ret); /* -ENOMEM */ BUG_ON(ret); /* -ENOMEM */
ret = btrfs_set_disk_extent_flags(trans, eb, flag, ret = btrfs_set_disk_extent_flags(trans, eb, flag);
btrfs_header_level(eb));
BUG_ON(ret); /* -ENOMEM */ BUG_ON(ret); /* -ENOMEM */
wc->flags[level] |= flag; wc->flags[level] |= flag;
} }
......
...@@ -141,7 +141,7 @@ int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, ...@@ -141,7 +141,7 @@ int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
struct extent_buffer *buf, int full_backref); struct extent_buffer *buf, int full_backref);
int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans, int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans,
struct extent_buffer *eb, u64 flags, int level); struct extent_buffer *eb, u64 flags);
int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_ref *ref); int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_ref *ref);
int btrfs_free_reserved_extent(struct btrfs_fs_info *fs_info, int btrfs_free_reserved_extent(struct btrfs_fs_info *fs_info,
......
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