Skip to content

Commit

Permalink
btrfs: make btrfs_set_root_node void
Browse files Browse the repository at this point in the history
This is fairly trivial - btrfs_set_root_node() - always returns zero so we
can just make it void.  All callers ignore the return code now anyway.  I
also made sure to check that none of the functions that
btrfs_set_root_node() calls returns an error that we might have needed to
catch and pass back.

Signed-off-by: Mark Fasheh <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
Mark Fasheh authored and chrismason-xx committed Aug 1, 2011
1 parent ff1f2b4 commit bf5f32e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2406,8 +2406,8 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct
btrfs_root_item *item, struct btrfs_key *key);
int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid);
int btrfs_find_orphan_roots(struct btrfs_root *tree_root);
int btrfs_set_root_node(struct btrfs_root_item *item,
struct extent_buffer *node);
void btrfs_set_root_node(struct btrfs_root_item *item,
struct extent_buffer *node);
void btrfs_check_and_init_root_item(struct btrfs_root_item *item);

/* dir-item.c */
Expand Down
5 changes: 2 additions & 3 deletions fs/btrfs/root-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid,
return ret;
}

int btrfs_set_root_node(struct btrfs_root_item *item,
struct extent_buffer *node)
void btrfs_set_root_node(struct btrfs_root_item *item,
struct extent_buffer *node)
{
btrfs_set_root_bytenr(item, node->start);
btrfs_set_root_level(item, btrfs_header_level(node));
btrfs_set_root_generation(item, btrfs_header_generation(node));
return 0;
}

/*
Expand Down

0 comments on commit bf5f32e

Please sign in to comment.