btrfs: remove parameter blocksize from read_tree_block
We know the tree block size, no need to pass it around. Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
@@ -1425,7 +1425,6 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
|
||||
struct tree_mod_root *old_root = NULL;
|
||||
u64 old_generation = 0;
|
||||
u64 logical;
|
||||
u32 blocksize;
|
||||
|
||||
eb_root = btrfs_read_lock_root_node(root);
|
||||
tm = __tree_mod_log_oldest_root(root->fs_info, eb_root, time_seq);
|
||||
@@ -1444,8 +1443,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
|
||||
if (old_root && tm && tm->op != MOD_LOG_KEY_REMOVE_WHILE_FREEING) {
|
||||
btrfs_tree_read_unlock(eb_root);
|
||||
free_extent_buffer(eb_root);
|
||||
blocksize = root->nodesize;
|
||||
old = read_tree_block(root, logical, blocksize, 0);
|
||||
old = read_tree_block(root, logical, 0);
|
||||
if (WARN_ON(!old || !extent_buffer_uptodate(old))) {
|
||||
free_extent_buffer(old);
|
||||
btrfs_warn(root->fs_info,
|
||||
@@ -1692,8 +1690,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
|
||||
uptodate = 0;
|
||||
if (!cur || !uptodate) {
|
||||
if (!cur) {
|
||||
cur = read_tree_block(root, blocknr,
|
||||
blocksize, gen);
|
||||
cur = read_tree_block(root, blocknr, gen);
|
||||
if (!cur || !extent_buffer_uptodate(cur)) {
|
||||
free_extent_buffer(cur);
|
||||
return -EIO;
|
||||
@@ -1872,7 +1869,6 @@ static noinline struct extent_buffer *read_node_slot(struct btrfs_root *root,
|
||||
BUG_ON(level == 0);
|
||||
|
||||
eb = read_tree_block(root, btrfs_node_blockptr(parent, slot),
|
||||
root->nodesize,
|
||||
btrfs_node_ptr_generation(parent, slot));
|
||||
if (eb && !extent_buffer_uptodate(eb)) {
|
||||
free_extent_buffer(eb);
|
||||
@@ -2507,7 +2503,7 @@ read_block_for_search(struct btrfs_trans_handle *trans,
|
||||
btrfs_release_path(p);
|
||||
|
||||
ret = -EAGAIN;
|
||||
tmp = read_tree_block(root, blocknr, blocksize, 0);
|
||||
tmp = read_tree_block(root, blocknr, 0);
|
||||
if (tmp) {
|
||||
/*
|
||||
* If the read above didn't mark this buffer up to date,
|
||||
|
Reference in New Issue
Block a user