btrfs: open code insert_orphan_item
Just open code it in its sole caller and remove a level of indirection. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
9037d3cbcb
commit
ecdcf3c259
@@ -1564,18 +1564,6 @@ out:
|
|||||||
return ret;
|
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,
|
static int count_inode_extrefs(struct btrfs_root *root,
|
||||||
struct btrfs_inode *inode, struct btrfs_path *path)
|
struct btrfs_inode *inode, struct btrfs_path *path)
|
||||||
{
|
{
|
||||||
@@ -1727,7 +1715,9 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
ret = insert_orphan_item(trans, root, ino);
|
ret = btrfs_insert_orphan_item(trans, root, ino);
|
||||||
|
if (ret == -EEXIST)
|
||||||
|
ret = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|||||||
Reference in New Issue
Block a user