OSDN Git Service

btrfs: Introduce init_delayed_ref_head
authorNikolay Borisov <nborisov@suse.com>
Tue, 24 Apr 2018 14:18:22 +0000 (17:18 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:31 +0000 (18:07 +0200)
commita2e569b3f2b138f2c25b4598cf4b18af8af39abd
tree564b0b090629b8f216ba81456cc3680203973de8
parentcd7f9699b113434467434580ebb8d9b328152fb8
btrfs: Introduce init_delayed_ref_head

add_delayed_ref_head implements the logic to both initialize a head_ref
structure as well as perform the necessary operations to add it to the
delayed ref machinery. This has resulted in a very cumebrsome interface
with loads of parameters and code, which at first glance, looks very
unwieldy. Begin untangling it by first extracting the initialization
only code in its own function. It's more or less verbatim copy of the
first part of add_delayed_ref_head.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-ref.c