btrfs: delayed-ref: extract find_first_ref_head from find_ref_head
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Mon, 15 Oct 2018 06:25:38 +0000 (14:25 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 17 Oct 2018 17:21:00 +0000 (19:21 +0200)
commit0a9df0df17a011fa4d17277a8c8dd662668c6426
tree683157edc234c77d7b2553a70df33f22b248c65c
parent5ce555578e0919237fa4bda92b4670e2dd176f85
btrfs: delayed-ref: extract find_first_ref_head from find_ref_head

The find_ref_head shouldn't return the first entry even if no exact match
is found. So move the hidden behavior to higher level.

Besides, remove the useless local variables in the btrfs_select_ref_head.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
[ reformat comment ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-ref.c