Skip to content

Commit

Permalink
btrfs: drop unused parameter from btrfs_release_path
Browse files Browse the repository at this point in the history
parameter tree root it's not used since commit
5f39d39 ("Btrfs: Create extent_buffer
interface for large blocksizes")

Signed-off-by: David Sterba <dsterba@suse.cz>
  • Loading branch information
David Sterba committed May 2, 2011
1 parent ba14419 commit b3b4aa7
Show file tree
Hide file tree
Showing 15 changed files with 160 additions and 160 deletions.
28 changes: 14 additions & 14 deletions fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void btrfs_free_path(struct btrfs_path *p)
{
if (!p)
return;
btrfs_release_path(NULL, p);
btrfs_release_path(p);
kmem_cache_free(btrfs_path_cachep, p);
}

Expand All @@ -117,7 +117,7 @@ void btrfs_free_path(struct btrfs_path *p)
*
* It is safe to call this on paths that no locks or extent buffers held.
*/
noinline void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p)
noinline void btrfs_release_path(struct btrfs_path *p)
{
int i;

Expand Down Expand Up @@ -1328,7 +1328,7 @@ static noinline int reada_for_balance(struct btrfs_root *root,
ret = -EAGAIN;

/* release the whole path */
btrfs_release_path(root, path);
btrfs_release_path(path);

/* read the blocks */
if (block1)
Expand Down Expand Up @@ -1475,7 +1475,7 @@ read_block_for_search(struct btrfs_trans_handle *trans,
return 0;
}
free_extent_buffer(tmp);
btrfs_release_path(NULL, p);
btrfs_release_path(p);
return -EIO;
}
}
Expand All @@ -1494,7 +1494,7 @@ read_block_for_search(struct btrfs_trans_handle *trans,
if (p->reada)
reada_for_search(root, p, level, slot, key->objectid);

btrfs_release_path(NULL, p);
btrfs_release_path(p);

ret = -EAGAIN;
tmp = read_tree_block(root, blocknr, blocksize, 0);
Expand Down Expand Up @@ -1563,7 +1563,7 @@ setup_nodes_for_search(struct btrfs_trans_handle *trans,
}
b = p->nodes[level];
if (!b) {
btrfs_release_path(NULL, p);
btrfs_release_path(p);
goto again;
}
BUG_ON(btrfs_header_nritems(b) == 1);
Expand Down Expand Up @@ -1753,7 +1753,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
if (!p->leave_spinning)
btrfs_set_path_blocking(p);
if (ret < 0)
btrfs_release_path(root, p);
btrfs_release_path(p);
return ret;
}

Expand Down Expand Up @@ -3026,7 +3026,7 @@ static noinline int setup_leaf_for_split(struct btrfs_trans_handle *trans,
struct btrfs_file_extent_item);
extent_len = btrfs_file_extent_num_bytes(leaf, fi);
}
btrfs_release_path(root, path);
btrfs_release_path(path);

path->keep_locks = 1;
path->search_for_split = 1;
Expand Down Expand Up @@ -3948,7 +3948,7 @@ int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path)
else
return 1;

btrfs_release_path(root, path);
btrfs_release_path(path);
ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
if (ret < 0)
return ret;
Expand Down Expand Up @@ -4072,7 +4072,7 @@ int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key,
sret = btrfs_find_next_key(root, path, min_key, level,
cache_only, min_trans);
if (sret == 0) {
btrfs_release_path(root, path);
btrfs_release_path(path);
goto again;
} else {
goto out;
Expand Down Expand Up @@ -4151,7 +4151,7 @@ int btrfs_find_next_key(struct btrfs_root *root, struct btrfs_path *path,
btrfs_node_key_to_cpu(c, &cur_key, slot);

orig_lowest = path->lowest_level;
btrfs_release_path(root, path);
btrfs_release_path(path);
path->lowest_level = level;
ret = btrfs_search_slot(NULL, root, &cur_key, path,
0, 0);
Expand Down Expand Up @@ -4228,7 +4228,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
again:
level = 1;
next = NULL;
btrfs_release_path(root, path);
btrfs_release_path(path);

path->keep_locks = 1;

Expand Down Expand Up @@ -4284,7 +4284,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
goto again;

if (ret < 0) {
btrfs_release_path(root, path);
btrfs_release_path(path);
goto done;
}

Expand Down Expand Up @@ -4323,7 +4323,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path)
goto again;

if (ret < 0) {
btrfs_release_path(root, path);
btrfs_release_path(path);
goto done;
}

Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2290,7 +2290,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct extent_buffer *parent,
int start_slot, int cache_only, u64 *last_ret,
struct btrfs_key *progress);
void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p);
void btrfs_release_path(struct btrfs_path *p);
struct btrfs_path *btrfs_alloc_path(void);
void btrfs_free_path(struct btrfs_path *p);
void btrfs_set_path_blocking(struct btrfs_path *p);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/dir-item.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
ret = 0;
goto out_free;
}
btrfs_release_path(root, path);
btrfs_release_path(path);

btrfs_set_key_type(&key, BTRFS_DIR_INDEX_KEY);
key.offset = index;
Expand Down
44 changes: 22 additions & 22 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ static int caching_kthread(void *data)
break;

caching_ctl->progress = last;
btrfs_release_path(extent_root, path);
btrfs_release_path(path);
up_read(&fs_info->extent_commit_sem);
mutex_unlock(&caching_ctl->mutex);
if (btrfs_transaction_in_commit(fs_info))
Expand Down Expand Up @@ -754,7 +754,7 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
atomic_inc(&head->node.refs);
spin_unlock(&delayed_refs->lock);

btrfs_release_path(root->fs_info->extent_root, path);
btrfs_release_path(path);

mutex_lock(&head->mutex);
mutex_unlock(&head->mutex);
Expand Down Expand Up @@ -934,7 +934,7 @@ static int convert_extent_item_v0(struct btrfs_trans_handle *trans,
break;
}
}
btrfs_release_path(root, path);
btrfs_release_path(path);

if (owner < BTRFS_FIRST_FREE_OBJECTID)
new_size += sizeof(*bi);
Expand Down Expand Up @@ -1042,7 +1042,7 @@ static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans,
return 0;
#ifdef BTRFS_COMPAT_EXTENT_TREE_V0
key.type = BTRFS_EXTENT_REF_V0_KEY;
btrfs_release_path(root, path);
btrfs_release_path(path);
ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
if (ret < 0) {
err = ret;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ static noinline int lookup_extent_data_ref(struct btrfs_trans_handle *trans,
if (match_extent_data_ref(leaf, ref, root_objectid,
owner, offset)) {
if (recow) {
btrfs_release_path(root, path);
btrfs_release_path(path);
goto again;
}
err = 0;
Expand Down Expand Up @@ -1141,7 +1141,7 @@ static noinline int insert_extent_data_ref(struct btrfs_trans_handle *trans,
if (match_extent_data_ref(leaf, ref, root_objectid,
owner, offset))
break;
btrfs_release_path(root, path);
btrfs_release_path(path);
key.offset++;
ret = btrfs_insert_empty_item(trans, root, path, &key,
size);
Expand All @@ -1167,7 +1167,7 @@ static noinline int insert_extent_data_ref(struct btrfs_trans_handle *trans,
btrfs_mark_buffer_dirty(leaf);
ret = 0;
fail:
btrfs_release_path(root, path);
btrfs_release_path(path);
return ret;
}

Expand Down Expand Up @@ -1293,7 +1293,7 @@ static noinline int lookup_tree_block_ref(struct btrfs_trans_handle *trans,
ret = -ENOENT;
#ifdef BTRFS_COMPAT_EXTENT_TREE_V0
if (ret == -ENOENT && parent) {
btrfs_release_path(root, path);
btrfs_release_path(path);
key.type = BTRFS_EXTENT_REF_V0_KEY;
ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
if (ret > 0)
Expand Down Expand Up @@ -1322,7 +1322,7 @@ static noinline int insert_tree_block_ref(struct btrfs_trans_handle *trans,
}

ret = btrfs_insert_empty_item(trans, root, path, &key, 0);
btrfs_release_path(root, path);
btrfs_release_path(path);
return ret;
}

Expand Down Expand Up @@ -1608,7 +1608,7 @@ static int lookup_extent_backref(struct btrfs_trans_handle *trans,
if (ret != -ENOENT)
return ret;

btrfs_release_path(root, path);
btrfs_release_path(path);
*ref_ret = NULL;

if (owner < BTRFS_FIRST_FREE_OBJECTID) {
Expand Down Expand Up @@ -1862,7 +1862,7 @@ static int __btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
__run_delayed_extent_op(extent_op, leaf, item);

btrfs_mark_buffer_dirty(leaf);
btrfs_release_path(root->fs_info->extent_root, path);
btrfs_release_path(path);

path->reada = 1;
path->leave_spinning = 1;
Expand Down Expand Up @@ -2361,7 +2361,7 @@ static noinline int check_delayed_ref(struct btrfs_trans_handle *trans,
atomic_inc(&head->node.refs);
spin_unlock(&delayed_refs->lock);

btrfs_release_path(root->fs_info->extent_root, path);
btrfs_release_path(path);

mutex_lock(&head->mutex);
mutex_unlock(&head->mutex);
Expand Down Expand Up @@ -2732,7 +2732,7 @@ static int write_one_cache_group(struct btrfs_trans_handle *trans,
bi = btrfs_item_ptr_offset(leaf, path->slots[0]);
write_extent_buffer(leaf, &cache->item, bi, sizeof(cache->item));
btrfs_mark_buffer_dirty(leaf);
btrfs_release_path(extent_root, path);
btrfs_release_path(path);
fail:
if (ret)
return ret;
Expand Down Expand Up @@ -2785,7 +2785,7 @@ static int cache_save_setup(struct btrfs_block_group_cache *block_group,
inode = lookup_free_space_inode(root, block_group, path);
if (IS_ERR(inode) && PTR_ERR(inode) != -ENOENT) {
ret = PTR_ERR(inode);
btrfs_release_path(root, path);
btrfs_release_path(path);
goto out;
}

Expand Down Expand Up @@ -2854,7 +2854,7 @@ static int cache_save_setup(struct btrfs_block_group_cache *block_group,
out_put:
iput(inode);
out_free:
btrfs_release_path(root, path);
btrfs_release_path(path);
out:
spin_lock(&block_group->lock);
block_group->disk_cache_state = dcs;
Expand Down Expand Up @@ -4541,7 +4541,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
NULL, refs_to_drop,
is_data);
BUG_ON(ret);
btrfs_release_path(extent_root, path);
btrfs_release_path(path);
path->leave_spinning = 1;

key.objectid = bytenr;
Expand Down Expand Up @@ -4580,7 +4580,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
owner_objectid, 0);
BUG_ON(ret < 0);

btrfs_release_path(extent_root, path);
btrfs_release_path(path);
path->leave_spinning = 1;

key.objectid = bytenr;
Expand Down Expand Up @@ -4650,7 +4650,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
ret = btrfs_del_items(trans, extent_root, path, path->slots[0],
num_to_del);
BUG_ON(ret);
btrfs_release_path(extent_root, path);
btrfs_release_path(path);

if (is_data) {
ret = btrfs_del_csums(trans, root, bytenr, num_bytes);
Expand Down Expand Up @@ -6480,7 +6480,7 @@ int btrfs_drop_snapshot(struct btrfs_root *root,
trans->block_rsv = block_rsv;
}
}
btrfs_release_path(root, path);
btrfs_release_path(path);
BUG_ON(err);

ret = btrfs_del_root(trans, tree_root, &root->root_key);
Expand Down Expand Up @@ -8580,7 +8580,7 @@ int btrfs_read_block_groups(struct btrfs_root *root)
memcpy(&cache->key, &found_key, sizeof(found_key));

key.objectid = found_key.objectid + found_key.offset;
btrfs_release_path(root, path);
btrfs_release_path(path);
cache->flags = btrfs_block_group_flags(&cache->item);
cache->sectorsize = root->sectorsize;

Expand Down Expand Up @@ -8802,12 +8802,12 @@ int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
if (ret < 0)
goto out;
if (ret > 0)
btrfs_release_path(tree_root, path);
btrfs_release_path(path);
if (ret == 0) {
ret = btrfs_del_item(trans, tree_root, path);
if (ret)
goto out;
btrfs_release_path(tree_root, path);
btrfs_release_path(path);
}

spin_lock(&root->fs_info->block_group_cache_lock);
Expand Down
12 changes: 6 additions & 6 deletions fs/btrfs/file-item.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root,
u32 item_size;

if (item)
btrfs_release_path(root, path);
btrfs_release_path(path);
item = btrfs_lookup_csum(NULL, root->fs_info->csum_root,
path, disk_bytenr, 0);
if (IS_ERR(item)) {
Expand All @@ -213,7 +213,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root,
(unsigned long long)offset);
}
item = NULL;
btrfs_release_path(root, path);
btrfs_release_path(path);
goto found;
}
btrfs_item_key_to_cpu(path->nodes[0], &found_key,
Expand Down Expand Up @@ -631,7 +631,7 @@ int btrfs_del_csums(struct btrfs_trans_handle *trans,
if (key.offset < bytenr)
break;
}
btrfs_release_path(root, path);
btrfs_release_path(path);
}
out:
btrfs_free_path(path);
Expand Down Expand Up @@ -722,7 +722,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
* at this point, we know the tree has an item, but it isn't big
* enough yet to put our csum in. Grow it
*/
btrfs_release_path(root, path);
btrfs_release_path(path);
ret = btrfs_search_slot(trans, root, &file_key, path,
csum_size, 1);
if (ret < 0)
Expand Down Expand Up @@ -766,7 +766,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
}

insert:
btrfs_release_path(root, path);
btrfs_release_path(path);
csum_offset = 0;
if (found_next) {
u64 tmp = total_bytes + root->sectorsize;
Expand Down Expand Up @@ -850,7 +850,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
}
btrfs_mark_buffer_dirty(path->nodes[0]);
if (total_bytes < sums->len) {
btrfs_release_path(root, path);
btrfs_release_path(path);
cond_resched();
goto again;
}
Expand Down
Loading

0 comments on commit b3b4aa7

Please sign in to comment.