btrfs: add a helper to return a head ref
authorJosef Bacik <josef@toxicpanda.com>
Fri, 29 Sep 2017 19:43:52 +0000 (15:43 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:28:00 +0000 (12:28 +0100)
commit2eadaa22c17ac3c546850f70d9d20fa19459dbce
tree9b5751d5d4b6f7c49316372e86f28b1a1daad9b6
parent7c777430e855898461d54efd14b3942c763ee8de
btrfs: add a helper to return a head ref

Simplify the error handling in __btrfs_run_delayed_refs by breaking out
the code used to return a head back to the delayed_refs tree for
processing into a helper function.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c