summaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-09-09 21:39:03 -0400
committerDavid Sterba <dsterba@suse.com>2016-12-06 16:07:00 +0100
commit3a45bb207ee2c5548ebf6f5fcc7d249e141f15e8 (patch)
treea1739986199aebac91eca65c5eed7cbe7ad4fded /fs/btrfs/relocation.c
parentbf89d38febaadd5b1da60fed54929cbde65fedf9 (diff)
btrfs: remove root parameter from transaction commit/end routines
Now we only use the root parameter to print the root objectid in a tracepoint. We can use the root parameter from the transaction handle for that. It's also used to join the transaction with async commits, so we remove the comment that it's just for checking. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 341a099c4967..5d222c8d2213 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2270,7 +2270,7 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
path->slots[level]);
root_item->drop_level = level;
- btrfs_end_transaction_throttle(trans, root);
+ btrfs_end_transaction_throttle(trans);
trans = NULL;
btrfs_btree_balance_dirty(fs_info);
@@ -2301,7 +2301,7 @@ out:
}
if (trans)
- btrfs_end_transaction_throttle(trans, root);
+ btrfs_end_transaction_throttle(trans);
btrfs_btree_balance_dirty(fs_info);
@@ -2346,7 +2346,7 @@ again:
if (!err) {
if (num_bytes != rc->merging_rsv_size) {
- btrfs_end_transaction(trans, rc->extent_root);
+ btrfs_end_transaction(trans);
btrfs_block_rsv_release(fs_info, rc->block_rsv,
num_bytes);
goto again;
@@ -2378,9 +2378,9 @@ again:
list_splice(&reloc_roots, &rc->reloc_roots);
if (!err)
- btrfs_commit_transaction(trans, rc->extent_root);
+ btrfs_commit_transaction(trans);
else
- btrfs_end_transaction(trans, rc->extent_root);
+ btrfs_end_transaction(trans);
return err;
}
@@ -3555,7 +3555,7 @@ truncate:
ret = btrfs_truncate_free_space_cache(root, trans, block_group, inode);
- btrfs_end_transaction(trans, root);
+ btrfs_end_transaction(trans);
btrfs_btree_balance_dirty(fs_info);
out:
iput(inode);
@@ -3986,7 +3986,7 @@ int prepare_to_relocate(struct reloc_control *rc)
*/
return PTR_ERR(trans);
}
- btrfs_commit_transaction(trans, rc->extent_root);
+ btrfs_commit_transaction(trans);
return 0;
}
@@ -4033,7 +4033,7 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
}
restart:
if (update_backref_cache(trans, &rc->backref_cache)) {
- btrfs_end_transaction(trans, rc->extent_root);
+ btrfs_end_transaction(trans);
continue;
}
@@ -4121,7 +4121,7 @@ restart:
}
}
- btrfs_end_transaction_throttle(trans, rc->extent_root);
+ btrfs_end_transaction_throttle(trans);
btrfs_btree_balance_dirty(fs_info);
trans = NULL;
@@ -4150,7 +4150,7 @@ restart:
clear_extent_bits(&rc->processed_blocks, 0, (u64)-1, EXTENT_DIRTY);
if (trans) {
- btrfs_end_transaction_throttle(trans, rc->extent_root);
+ btrfs_end_transaction_throttle(trans);
btrfs_btree_balance_dirty(fs_info);
}
@@ -4181,7 +4181,7 @@ restart:
err = PTR_ERR(trans);
goto out_free;
}
- btrfs_commit_transaction(trans, rc->extent_root);
+ btrfs_commit_transaction(trans);
out_free:
btrfs_free_block_rsv(fs_info, rc->block_rsv);
btrfs_free_path(path);
@@ -4257,7 +4257,7 @@ struct inode *create_reloc_inode(struct btrfs_fs_info *fs_info,
err = btrfs_orphan_add(trans, inode);
out:
- btrfs_end_transaction(trans, root);
+ btrfs_end_transaction(trans);
btrfs_btree_balance_dirty(fs_info);
if (err) {
if (inode)
@@ -4442,7 +4442,7 @@ static noinline_for_stack int mark_garbage_root(struct btrfs_root *root)
ret = btrfs_update_root(trans, fs_info->tree_root,
&root->root_key, &root->root_item);
- err = btrfs_end_transaction(trans, fs_info->tree_root);
+ err = btrfs_end_transaction(trans);
if (err)
return err;
return ret;
@@ -4573,7 +4573,7 @@ int btrfs_recover_relocation(struct btrfs_root *root)
fs_root->reloc_root = reloc_root;
}
- err = btrfs_commit_transaction(trans, rc->extent_root);
+ err = btrfs_commit_transaction(trans);
if (err)
goto out_free;
@@ -4586,7 +4586,7 @@ int btrfs_recover_relocation(struct btrfs_root *root)
err = PTR_ERR(trans);
goto out_free;
}
- err = btrfs_commit_transaction(trans, rc->extent_root);
+ err = btrfs_commit_transaction(trans);
out_free:
kfree(rc);
out: