summaryrefslogtreecommitdiff
path: root/fs/btrfs/scrub.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/scrub.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/scrub.c')
-rw-r--r--fs/btrfs/scrub.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 09fb2fb0848e..0d63d994be10 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -839,7 +839,7 @@ static void scrub_fixup_nodatasum(struct btrfs_work *work)
out:
if (trans && !IS_ERR(trans))
- btrfs_end_transaction(trans, fixup->root);
+ btrfs_end_transaction(trans);
if (uncorrectable) {
spin_lock(&sctx->stat_lock);
++sctx->stat.uncorrectable_errors;
@@ -3616,8 +3616,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
if (IS_ERR(trans))
ret = PTR_ERR(trans);
else
- ret = btrfs_commit_transaction(trans,
- root);
+ ret = btrfs_commit_transaction(trans);
if (ret) {
scrub_pause_off(fs_info);
btrfs_put_block_group(cache);
@@ -4202,7 +4201,7 @@ static void copy_nocow_pages_worker(struct btrfs_work *work)
goto out;
}
- btrfs_end_transaction(trans, root);
+ btrfs_end_transaction(trans);
trans = NULL;
while (!list_empty(&nocow_ctx->inodes)) {
struct scrub_nocow_inode *entry;
@@ -4230,7 +4229,7 @@ out:
kfree(entry);
}
if (trans && !IS_ERR(trans))
- btrfs_end_transaction(trans, root);
+ btrfs_end_transaction(trans);
if (not_written)
btrfs_dev_replace_stats_inc(&fs_info->dev_replace.
num_uncorrectable_read_errors);