Skip to content

Commit

Permalink
btrfs: Simplify btrfs_insert_root
Browse files Browse the repository at this point in the history
btrfs_insert_root is just a wrapper for btrfs_insert_item. Just return
the error directly.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
  • Loading branch information
Jeff Mahoney authored and David Sterba committed Mar 22, 2012
1 parent cddcd80 commit d16cb05
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions fs/btrfs/root-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,10 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
return ret;
}

int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root
*root, struct btrfs_key *key, struct btrfs_root_item
*item)
int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
struct btrfs_key *key, struct btrfs_root_item *item)
{
int ret;
ret = btrfs_insert_item(trans, root, key, item, sizeof(*item));
return ret;
return btrfs_insert_item(trans, root, key, item, sizeof(*item));
}

/*
Expand Down

0 comments on commit d16cb05

Please sign in to comment.