btrfs: simplify insert_orphan_item
authorDavid Sterba <dsterba@suse.cz>
Fri, 2 Jan 2015 18:12:57 +0000 (19:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Apr 2015 08:10:15 +0000 (10:10 +0200)
commit0187ad2b69a51a23924cd41f730e2d923535db80
treed15620485c82695aae903df8d30adbbf9c957e98
parente3bb7004125d5c0783da8dcbcf818063cf885912
btrfs: simplify insert_orphan_item

commit 9c4f61f01d269815bb7c37be3ede59c5587747c6 upstream.

We can search and add the orphan item in one go,
btrfs_insert_orphan_item will find out if the item already exists.

Signed-off-by: David Sterba <dsterba@suse.cz>
Cc: Chris Mason <clm@fb.com>
Cc: Roman Mamedov <rm@romanrm.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/tree-log.c