Skip to content

Commit

Permalink
btrfs: remove unused parameter blocksize from btrfs_find_tree_block
Browse files Browse the repository at this point in the history
Signed-off-by: David Sterba <dsterba@suse.cz>
  • Loading branch information
David Sterba committed Oct 2, 2014
1 parent ce86cd5 commit 0308af4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
12 changes: 5 additions & 7 deletions fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
continue;
}

cur = btrfs_find_tree_block(root, blocknr, blocksize);
cur = btrfs_find_tree_block(root, blocknr);
if (cur)
uptodate = btrfs_buffer_uptodate(cur, gen, 0);
else
Expand Down Expand Up @@ -2264,7 +2264,7 @@ static void reada_for_search(struct btrfs_root *root,

search = btrfs_node_blockptr(node, slot);
blocksize = root->nodesize;
eb = btrfs_find_tree_block(root, search, blocksize);
eb = btrfs_find_tree_block(root, search);
if (eb) {
free_extent_buffer(eb);
return;
Expand Down Expand Up @@ -2326,7 +2326,7 @@ static noinline void reada_for_balance(struct btrfs_root *root,
if (slot > 0) {
block1 = btrfs_node_blockptr(parent, slot - 1);
gen = btrfs_node_ptr_generation(parent, slot - 1);
eb = btrfs_find_tree_block(root, block1, blocksize);
eb = btrfs_find_tree_block(root, block1);
/*
* if we get -eagain from btrfs_buffer_uptodate, we
* don't want to return eagain here. That will loop
Expand All @@ -2339,7 +2339,7 @@ static noinline void reada_for_balance(struct btrfs_root *root,
if (slot + 1 < nritems) {
block2 = btrfs_node_blockptr(parent, slot + 1);
gen = btrfs_node_ptr_generation(parent, slot + 1);
eb = btrfs_find_tree_block(root, block2, blocksize);
eb = btrfs_find_tree_block(root, block2);
if (eb && btrfs_buffer_uptodate(eb, gen, 1) != 0)
block2 = 0;
free_extent_buffer(eb);
Expand Down Expand Up @@ -2450,16 +2450,14 @@ read_block_for_search(struct btrfs_trans_handle *trans,
{
u64 blocknr;
u64 gen;
u32 blocksize;
struct extent_buffer *b = *eb_ret;
struct extent_buffer *tmp;
int ret;

blocknr = btrfs_node_blockptr(b, slot);
gen = btrfs_node_ptr_generation(b, slot);
blocksize = root->nodesize;

tmp = btrfs_find_tree_block(root, blocknr, blocksize);
tmp = btrfs_find_tree_block(root, blocknr);
if (tmp) {
/* first we do an atomic uptodate check */
if (btrfs_buffer_uptodate(tmp, gen, 1) > 0) {
Expand Down
5 changes: 2 additions & 3 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize,
}

struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root,
u64 bytenr, u32 blocksize)
u64 bytenr)
{
return find_extent_buffer(root->fs_info, bytenr);
}
Expand Down Expand Up @@ -4002,8 +4002,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,

clear_extent_bits(dirty_pages, start, end, mark, GFP_NOFS);
while (start <= end) {
eb = btrfs_find_tree_block(root, start,
root->nodesize);
eb = btrfs_find_tree_block(root, start);
start += root->nodesize;
if (!eb)
continue;
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/disk-io.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int write_ctree_super(struct btrfs_trans_handle *trans,
struct buffer_head *btrfs_read_dev_super(struct block_device *bdev);
int btrfs_commit_super(struct btrfs_root *root);
struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root,
u64 bytenr, u32 blocksize);
u64 bytenr);
struct btrfs_root *btrfs_read_fs_root(struct btrfs_root *tree_root,
struct btrfs_key *location);
int btrfs_init_fs_root(struct btrfs_root *root);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -7825,7 +7825,7 @@ static noinline int do_walk_down(struct btrfs_trans_handle *trans,
bytenr = btrfs_node_blockptr(path->nodes[level], path->slots[level]);
blocksize = root->nodesize;

next = btrfs_find_tree_block(root, bytenr, blocksize);
next = btrfs_find_tree_block(root, bytenr);
if (!next) {
next = btrfs_find_create_tree_block(root, bytenr, blocksize);
if (!next)
Expand Down

0 comments on commit 0308af4

Please sign in to comment.