Skip to content

Commit ecdcf3c

Browse files
lorddoskiaskdave
authored andcommitted
btrfs: open code insert_orphan_item
Just open code it in its sole caller and remove a level of indirection. Reviewed-by: Anand Jain <[email protected]> Signed-off-by: Nikolay Borisov <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 9037d3c commit ecdcf3c

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

fs/btrfs/tree-log.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,18 +1564,6 @@ static noinline int add_inode_ref(struct btrfs_trans_handle *trans,
15641564
return ret;
15651565
}
15661566

1567-
static int insert_orphan_item(struct btrfs_trans_handle *trans,
1568-
struct btrfs_root *root, u64 ino)
1569-
{
1570-
int ret;
1571-
1572-
ret = btrfs_insert_orphan_item(trans, root, ino);
1573-
if (ret == -EEXIST)
1574-
ret = 0;
1575-
1576-
return ret;
1577-
}
1578-
15791567
static int count_inode_extrefs(struct btrfs_root *root,
15801568
struct btrfs_inode *inode, struct btrfs_path *path)
15811569
{
@@ -1727,7 +1715,9 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
17271715
if (ret)
17281716
goto out;
17291717
}
1730-
ret = insert_orphan_item(trans, root, ino);
1718+
ret = btrfs_insert_orphan_item(trans, root, ino);
1719+
if (ret == -EEXIST)
1720+
ret = 0;
17311721
}
17321722

17331723
out:

0 commit comments

Comments
 (0)