btrfs: Open code insert_orphan_item
PATCH 1/1 btrfs: Open code insert_orphan_item
Just open code it in its sole caller and remove a level of indirection.
Signed-off-by Nikolay Borisov <[email protected]>
--- fs/btrfs/tree-log.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
fs/btrfs/tree-log.c +3 -13
@@ -1565,18 +1565,6 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,return ret; } -static int insert_orphan_item (struct btrfs_trans_handle *trans, -struct btrfs_root *root,u64 ino) -{ -int ret; - - ret =btrfs_insert_orphan_item (trans, root, ino); -if (ret == -EEXIST ) - ret =0 ; - -return ret; -} -static int count_inode_extrefs (struct btrfs_root *root,struct btrfs_inode *inode,struct btrfs_path *path) {
@@ -1728,7 +1716,9 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,if (ret) goto out; } - ret =insert_orphan_item (trans, root, ino); + ret =btrfs_insert_orphan_item (trans, root, ino); +if (ret == -EEXIST ) + ret =0 ; } out:
Signature · 1 line
2.25.1
Quoted 3 lines · Nikolay Borisov
Just open code it in its sole caller and remove a level of indirection.
Signed-off-by Nikolay Borisov <[email protected]>
Reviewed-by Anand Jain <[email protected]>
Quoted 3 lines · Nikolay Borisov
Just open code it in its sole caller and remove a level of indirection.
Signed-off-by Nikolay Borisov <[email protected]>
Added to misc-next, thanks.