aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.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 10:07:00 -0500
commit3a45bb207ee2c5548ebf6f5fcc7d249e141f15e8 (patch)
treea1739986199aebac91eca65c5eed7cbe7ad4fded /fs/btrfs/dev-replace.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/dev-replace.c')
-rw-r--r--fs/btrfs/dev-replace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 1b545885f7b1..5de280b9ad73 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -335,7 +335,7 @@ int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info, char *tgtdev_name,
335 */ 335 */
336 trans = btrfs_attach_transaction(root); 336 trans = btrfs_attach_transaction(root);
337 if (!IS_ERR(trans)) { 337 if (!IS_ERR(trans)) {
338 ret = btrfs_commit_transaction(trans, root); 338 ret = btrfs_commit_transaction(trans);
339 if (ret) 339 if (ret)
340 return ret; 340 return ret;
341 } else if (PTR_ERR(trans) != -ENOENT) { 341 } else if (PTR_ERR(trans) != -ENOENT) {
@@ -397,7 +397,7 @@ int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info, char *tgtdev_name,
397 goto leave; 397 goto leave;
398 } 398 }
399 399
400 ret = btrfs_commit_transaction(trans, root); 400 ret = btrfs_commit_transaction(trans);
401 WARN_ON(ret); 401 WARN_ON(ret);
402 402
403 /* the disk copy procedure reuses the scrub code */ 403 /* the disk copy procedure reuses the scrub code */
@@ -513,7 +513,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
513 mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); 513 mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
514 return PTR_ERR(trans); 514 return PTR_ERR(trans);
515 } 515 }
516 ret = btrfs_commit_transaction(trans, root); 516 ret = btrfs_commit_transaction(trans);
517 WARN_ON(ret); 517 WARN_ON(ret);
518 518
519 mutex_lock(&uuid_mutex); 519 mutex_lock(&uuid_mutex);
@@ -603,7 +603,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
603 /* write back the superblocks */ 603 /* write back the superblocks */
604 trans = btrfs_start_transaction(root, 0); 604 trans = btrfs_start_transaction(root, 0);
605 if (!IS_ERR(trans)) 605 if (!IS_ERR(trans))
606 btrfs_commit_transaction(trans, root); 606 btrfs_commit_transaction(trans);
607 607
608 mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); 608 mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
609 609
@@ -718,7 +718,7 @@ static u64 __btrfs_dev_replace_cancel(struct btrfs_fs_info *fs_info)
718 mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); 718 mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
719 return PTR_ERR(trans); 719 return PTR_ERR(trans);
720 } 720 }
721 ret = btrfs_commit_transaction(trans, root); 721 ret = btrfs_commit_transaction(trans);
722 WARN_ON(ret); 722 WARN_ON(ret);
723 if (tgt_device) 723 if (tgt_device)
724 btrfs_destroy_dev_replace_tgtdev(fs_info, tgt_device); 724 btrfs_destroy_dev_replace_tgtdev(fs_info, tgt_device);