summary refs log tree commit diff
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-21 12:27:21 +0300
committerDavid Sterba <dsterba@suse.com>2018-05-29 18:12:53 +0200
commit4e6bd4e0aaf8e00d9ea4472d91252715c4b4bd5d (patch)
tree9e265c8be64d287767bf22febbdbbf7ec2e7ac6d /net/mac80211/util.c
parent9dcdbe0144f97c4567e022b75ba8e888e8199660 (diff)
downloadlinux-4e6bd4e0aaf8e00d9ea4472d91252715c4b4bd5d.tar.gz
btrfs: Simplify alloc_reserved_tree_block interface
This function currently takes 7 parameters, most of which are proxies
for values from btrfs_delayed_ref_node struct which is not passed. This
patch simplifies the interface of the function by simply passing said
delayed ref node struct to the function. This enables us to:

1. Move locals variables and init code related to them from
   run_delayed_tree_ref which should only be used inside
   alloc_reserved_tree_block, such as skinny_metadata and the btrfs_key,
   representing the extent being inserted. This removes the need for the
   "ins" argument. Instead, it's replaced by a local var with a more
   verbose name - extent_key.

2. Now that we have a reference to the node in alloc_reserved_tree_block
   the delayed_tree_ref struct can be referenced inside the function and
   this enable removing the "ref->level", "parent" and "ref_root"
   arguments.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'net/mac80211/util.c')
0 files changed, 0 insertions, 0 deletions