diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-09-09 21:39:03 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:07:00 +0100 |
commit | 3a45bb207ee2c5548ebf6f5fcc7d249e141f15e8 (patch) | |
tree | a1739986199aebac91eca65c5eed7cbe7ad4fded /fs/btrfs/file.c | |
parent | bf89d38febaadd5b1da60fed54929cbde65fedf9 (diff) | |
download | linux-3a45bb207ee2c5548ebf6f5fcc7d249e141f15e8.tar.bz2 |
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/file.c')
-rw-r--r-- | fs/btrfs/file.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 2d3b93dd9c2c..140271b1ea2e 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2146,7 +2146,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) * which are indicated by ctx.io_err. */ if (ctx.io_err) { - btrfs_end_transaction(trans, root); + btrfs_end_transaction(trans); ret = ctx.io_err; goto out; } @@ -2155,20 +2155,20 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) if (!ret) { ret = btrfs_sync_log(trans, root, &ctx); if (!ret) { - ret = btrfs_end_transaction(trans, root); + ret = btrfs_end_transaction(trans); goto out; } } if (!full_sync) { ret = btrfs_wait_ordered_range(inode, start, len); if (ret) { - btrfs_end_transaction(trans, root); + btrfs_end_transaction(trans); goto out; } } - ret = btrfs_commit_transaction(trans, root); + ret = btrfs_commit_transaction(trans); } else { - ret = btrfs_end_transaction(trans, root); + ret = btrfs_end_transaction(trans); } out: return ret > 0 ? -EIO : ret; @@ -2574,7 +2574,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) break; } - btrfs_end_transaction(trans, root); + btrfs_end_transaction(trans); btrfs_btree_balance_dirty(fs_info); trans = btrfs_start_transaction(root, rsv_count); @@ -2642,7 +2642,7 @@ out_trans: trans->block_rsv = &fs_info->trans_block_rsv; ret = btrfs_update_inode(trans, root, inode); updated_inode = true; - btrfs_end_transaction(trans, root); + btrfs_end_transaction(trans); btrfs_btree_balance_dirty(fs_info); out_free: btrfs_free_path(path); @@ -2664,7 +2664,7 @@ out_only_mutex: err = PTR_ERR(trans); } else { err = btrfs_update_inode(trans, root, inode); - ret = btrfs_end_transaction(trans, root); + ret = btrfs_end_transaction(trans); } } inode_unlock(inode); @@ -2906,9 +2906,9 @@ static long btrfs_fallocate(struct file *file, int mode, btrfs_ordered_update_i_size(inode, actual_end, NULL); ret = btrfs_update_inode(trans, root, inode); if (ret) - btrfs_end_transaction(trans, root); + btrfs_end_transaction(trans); else - ret = btrfs_end_transaction(trans, root); + ret = btrfs_end_transaction(trans); } } out_unlock: |