diff options
| author | Josef Bacik <josef@redhat.com> | 2011-04-13 12:54:33 -0400 |
|---|---|---|
| committer | Josef Bacik <josef@redhat.com> | 2011-05-23 13:00:56 -0400 |
| commit | 7a7eaa40a39bde4eefc91aadeb1ce3dc4e6a1252 (patch) | |
| tree | eea3dea572a73168b70efa9fba2e9800457571d7 | |
| parent | 74b2107543da4ed9607ec484f63c42362dc9fca6 (diff) | |
Btrfs: take away the num_items argument from btrfs_join_transaction
I keep forgetting that btrfs_join_transaction() just ignores the num_items
argument, which leads me to sending pointless patches and looking stupid :). So
just kill the num_items argument from btrfs_join_transaction and
btrfs_start_ioctl_transaction, since neither of them use it. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
| -rw-r--r-- | fs/btrfs/disk-io.c | 6 | ||||
| -rw-r--r-- | fs/btrfs/extent-tree.c | 12 | ||||
| -rw-r--r-- | fs/btrfs/inode.c | 34 | ||||
| -rw-r--r-- | fs/btrfs/ioctl.c | 4 | ||||
| -rw-r--r-- | fs/btrfs/relocation.c | 12 | ||||
| -rw-r--r-- | fs/btrfs/transaction.c | 13 | ||||
| -rw-r--r-- | fs/btrfs/transaction.h | 9 |
7 files changed, 42 insertions, 48 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 228cf36ece83..9d6c9e332ca3 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
| @@ -1568,7 +1568,7 @@ static int transaction_kthread(void *arg) | |||
| 1568 | transid = cur->transid; | 1568 | transid = cur->transid; |
| 1569 | spin_unlock(&root->fs_info->new_trans_lock); | 1569 | spin_unlock(&root->fs_info->new_trans_lock); |
| 1570 | 1570 | ||
| 1571 | trans = btrfs_join_transaction(root, 1); | 1571 | trans = btrfs_join_transaction(root); |
| 1572 | BUG_ON(IS_ERR(trans)); | 1572 | BUG_ON(IS_ERR(trans)); |
| 1573 | if (transid == trans->transid) { | 1573 | if (transid == trans->transid) { |
| 1574 | ret = btrfs_commit_transaction(trans, root); | 1574 | ret = btrfs_commit_transaction(trans, root); |
| @@ -2495,13 +2495,13 @@ int btrfs_commit_super(struct btrfs_root *root) | |||
| 2495 | down_write(&root->fs_info->cleanup_work_sem); | 2495 | down_write(&root->fs_info->cleanup_work_sem); |
| 2496 | up_write(&root->fs_info->cleanup_work_sem); | 2496 | up_write(&root->fs_info->cleanup_work_sem); |
| 2497 | 2497 | ||
| 2498 | trans = btrfs_join_transaction(root, 1); | 2498 | trans = btrfs_join_transaction(root); |
| 2499 | if (IS_ERR(trans)) | 2499 | if (IS_ERR(trans)) |
| 2500 | return PTR_ERR(trans); | 2500 | return PTR_ERR(trans); |
| 2501 | ret = btrfs_commit_transaction(trans, root); | 2501 | ret = btrfs_commit_transaction(trans, root); |
| 2502 | BUG_ON(ret); | 2502 | BUG_ON(ret); |
| 2503 | /* run commit again to drop the original snapshot */ | 2503 | /* run commit again to drop the original snapshot */ |
| 2504 | trans = btrfs_join_transaction(root, 1); | 2504 | trans = btrfs_join_transaction(root); |
| 2505 | if (IS_ERR(trans)) | 2505 | if (IS_ERR(trans)) |
| 2506 | return PTR_ERR(trans); | 2506 | return PTR_ERR(trans); |
| 2507 | btrfs_commit_transaction(trans, root); | 2507 | btrfs_commit_transaction(trans, root); |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 9ee6bd55e16c..941b28e78931 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
| @@ -3174,7 +3174,7 @@ again: | |||
| 3174 | spin_unlock(&data_sinfo->lock); | 3174 | spin_unlock(&data_sinfo->lock); |
| 3175 | alloc: | 3175 | alloc: |
| 3176 | alloc_target = btrfs_get_alloc_profile(root, 1); | 3176 | alloc_target = btrfs_get_alloc_profile(root, 1); |
| 3177 | trans = btrfs_join_transaction(root, 1); | 3177 | trans = btrfs_join_transaction(root); |
| 3178 | if (IS_ERR(trans)) | 3178 | if (IS_ERR(trans)) |
| 3179 | return PTR_ERR(trans); | 3179 | return PTR_ERR(trans); |
| 3180 | 3180 | ||
| @@ -3202,7 +3202,7 @@ alloc: | |||
| 3202 | commit_trans: | 3202 | commit_trans: |
| 3203 | if (!committed && !root->fs_info->open_ioctl_trans) { | 3203 | if (!committed && !root->fs_info->open_ioctl_trans) { |
| 3204 | committed = 1; | 3204 | committed = 1; |
| 3205 | trans = btrfs_join_transaction(root, 1); | 3205 | trans = btrfs_join_transaction(root); |
| 3206 | if (IS_ERR(trans)) | 3206 | if (IS_ERR(trans)) |
| 3207 | return PTR_ERR(trans); | 3207 | return PTR_ERR(trans); |
| 3208 | ret = btrfs_commit_transaction(trans, root); | 3208 | ret = btrfs_commit_transaction(trans, root); |
| @@ -3589,7 +3589,7 @@ again: | |||
| 3589 | goto out; | 3589 | goto out; |
| 3590 | 3590 | ||
| 3591 | ret = -ENOSPC; | 3591 | ret = -ENOSPC; |
| 3592 | trans = btrfs_join_transaction(root, 1); | 3592 | trans = btrfs_join_transaction(root); |
| 3593 | if (IS_ERR(trans)) | 3593 | if (IS_ERR(trans)) |
| 3594 | goto out; | 3594 | goto out; |
| 3595 | ret = btrfs_commit_transaction(trans, root); | 3595 | ret = btrfs_commit_transaction(trans, root); |
| @@ -3816,7 +3816,7 @@ int btrfs_block_rsv_check(struct btrfs_trans_handle *trans, | |||
| 3816 | if (trans) | 3816 | if (trans) |
| 3817 | return -EAGAIN; | 3817 | return -EAGAIN; |
| 3818 | 3818 | ||
| 3819 | trans = btrfs_join_transaction(root, 1); | 3819 | trans = btrfs_join_transaction(root); |
| 3820 | BUG_ON(IS_ERR(trans)); | 3820 | BUG_ON(IS_ERR(trans)); |
| 3821 | ret = btrfs_commit_transaction(trans, root); | 3821 | ret = btrfs_commit_transaction(trans, root); |
| 3822 | return 0; | 3822 | return 0; |
| @@ -7649,7 +7649,7 @@ int btrfs_drop_dead_reloc_roots(struct btrfs_root *root) | |||
| 7649 | 7649 | ||
| 7650 | BUG_ON(reloc_root->commit_root != NULL); | 7650 | BUG_ON(reloc_root->commit_root != NULL); |
| 7651 | while (1) { | 7651 | while (1) { |
| 7652 | trans = btrfs_join_transaction(root, 1); | 7652 | trans = btrfs_join_transaction(root); |
| 7653 | BUG_ON(IS_ERR(trans)); | 7653 | BUG_ON(IS_ERR(trans)); |
| 7654 | 7654 | ||
| 7655 | mutex_lock(&root->fs_info->drop_mutex); | 7655 | mutex_lock(&root->fs_info->drop_mutex); |
| @@ -8176,7 +8176,7 @@ int btrfs_set_block_group_ro(struct btrfs_root *root, | |||
| 8176 | 8176 | ||
| 8177 | BUG_ON(cache->ro); | 8177 | BUG_ON(cache->ro); |
| 8178 | 8178 | ||
| 8179 | trans = btrfs_join_transaction(root, 1); | 8179 | trans = btrfs_join_transaction(root); |
| 8180 | BUG_ON(IS_ERR(trans)); | 8180 | BUG_ON(IS_ERR(trans)); |
| 8181 | 8181 | ||
| 8182 | alloc_flags = update_block_group_flags(root, cache->flags); | 8182 | alloc_flags = update_block_group_flags(root, cache->flags); |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3b9f1643aa57..e47bdf0fb75a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
| @@ -420,7 +420,7 @@ again: | |||
| 420 | } | 420 | } |
| 421 | } | 421 | } |
| 422 | if (start == 0) { | 422 | if (start == 0) { |
| 423 | trans = btrfs_join_transaction(root, 1); | 423 | trans = btrfs_join_transaction(root); |
| 424 | BUG_ON(IS_ERR(trans)); | 424 | BUG_ON(IS_ERR(trans)); |
| 425 | btrfs_set_trans_block_group(trans, inode); | 425 | btrfs_set_trans_block_group(trans, inode); |
| 426 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; | 426 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; |
| @@ -617,7 +617,7 @@ retry: | |||
| 617 | async_extent->start + async_extent->ram_size - 1, | 617 | async_extent->start + async_extent->ram_size - 1, |
| 618 | GFP_NOFS); | 618 | GFP_NOFS); |
| 619 | 619 | ||
| 620 | trans = btrfs_join_transaction(root, 1); | 620 | trans = btrfs_join_transaction(root); |
| 621 | BUG_ON(IS_ERR(trans)); | 621 | BUG_ON(IS_ERR(trans)); |
| 622 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; | 622 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; |
| 623 | ret = btrfs_reserve_extent(trans, root, | 623 | ret = btrfs_reserve_extent(trans, root, |
| @@ -779,7 +779,7 @@ static noinline int cow_file_range(struct inode *inode, | |||
| 779 | int ret = 0; | 779 | int ret = 0; |
| 780 | 780 | ||
| 781 | BUG_ON(root == root->fs_info->tree_root); | 781 | BUG_ON(root == root->fs_info->tree_root); |
| 782 | trans = btrfs_join_transaction(root, 1); | 782 | trans = btrfs_join_transaction(root); |
| 783 | BUG_ON(IS_ERR(trans)); | 783 | BUG_ON(IS_ERR(trans)); |
| 784 | btrfs_set_trans_block_group(trans, inode); | 784 | btrfs_set_trans_block_group(trans, inode); |
| 785 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; | 785 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; |
| @@ -1056,9 +1056,9 @@ static noinline int run_delalloc_nocow(struct inode *inode, | |||
| 1056 | BUG_ON(!path); | 1056 | BUG_ON(!path); |
| 1057 | if (root == root->fs_info->tree_root) { | 1057 | if (root == root->fs_info->tree_root) { |
| 1058 | nolock = true; | 1058 | nolock = true; |
| 1059 | trans = btrfs_join_transaction_nolock(root, 1); | 1059 | trans = btrfs_join_transaction_nolock(root); |
| 1060 | } else { | 1060 | } else { |
| 1061 | trans = btrfs_join_transaction(root, 1); | 1061 | trans = btrfs_join_transaction(root); |
| 1062 | } | 1062 | } |
| 1063 | BUG_ON(IS_ERR(trans)); | 1063 | BUG_ON(IS_ERR(trans)); |
| 1064 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; | 1064 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; |
| @@ -1718,9 +1718,9 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) | |||
| 1718 | ret = btrfs_ordered_update_i_size(inode, 0, ordered_extent); | 1718 | ret = btrfs_ordered_update_i_size(inode, 0, ordered_extent); |
| 1719 | if (!ret) { | 1719 | if (!ret) { |
| 1720 | if (nolock) | 1720 | if (nolock) |
| 1721 | trans = btrfs_join_transaction_nolock(root, 1); | 1721 | trans = btrfs_join_transaction_nolock(root); |
| 1722 | else | 1722 | else |
| 1723 | trans = btrfs_join_transaction(root, 1); | 1723 | trans = btrfs_join_transaction(root); |
| 1724 | BUG_ON(IS_ERR(trans)); | 1724 | BUG_ON(IS_ERR(trans)); |
| 1725 | btrfs_set_trans_block_group(trans, inode); | 1725 | btrfs_set_trans_block_group(trans, inode); |
| 1726 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; | 1726 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; |
| @@ -1735,9 +1735,9 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end) | |||
| 1735 | 0, &cached_state, GFP_NOFS); | 1735 | 0, &cached_state, GFP_NOFS); |
| 1736 | 1736 | ||
| 1737 | if (nolock) | 1737 | if (nolock) |
| 1738 | trans = btrfs_join_transaction_nolock(root, 1); | 1738 | trans = btrfs_join_transaction_nolock(root); |
| 1739 | else | 1739 | else |
| 1740 | trans = btrfs_join_transaction(root, 1); | 1740 | trans = btrfs_join_transaction(root); |
| 1741 | BUG_ON(IS_ERR(trans)); | 1741 | BUG_ON(IS_ERR(trans)); |
| 1742 | btrfs_set_trans_block_group(trans, inode); | 1742 | btrfs_set_trans_block_group(trans, inode); |
| 1743 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; | 1743 | trans->block_rsv = &root->fs_info->delalloc_block_rsv; |
| @@ -2415,7 +2415,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) | |||
| 2415 | (u64)-1); | 2415 | (u64)-1); |
| 2416 | 2416 | ||
| 2417 | if (root->orphan_block_rsv || root->orphan_item_inserted) { | 2417 | if (root->orphan_block_rsv || root->orphan_item_inserted) { |
| 2418 | trans = btrfs_join_transaction(root, 1); | 2418 | trans = btrfs_join_transaction(root); |
| 2419 | if (!IS_ERR(trans)) | 2419 | if (!IS_ERR(trans)) |
| 2420 | btrfs_end_transaction(trans, root); | 2420 | btrfs_end_transaction(trans, root); |
| 2421 | } | 2421 | } |
| @@ -4378,9 +4378,9 @@ int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
| 4378 | 4378 | ||
| 4379 | if (wbc->sync_mode == WB_SYNC_ALL) { | 4379 | if (wbc->sync_mode == WB_SYNC_ALL) { |
| 4380 | if (nolock) | 4380 | if (nolock) |
| 4381 | trans = btrfs_join_transaction_nolock(root, 1); | 4381 | trans = btrfs_join_transaction_nolock(root); |
| 4382 | else | 4382 | else |
| 4383 | trans = btrfs_join_transaction(root, 1); | 4383 | trans = btrfs_join_transaction(root); |
| 4384 | if (IS_ERR(trans)) | 4384 | if (IS_ERR(trans)) |
| 4385 | return PTR_ERR(trans); | 4385 | return PTR_ERR(trans); |
| 4386 | btrfs_set_trans_block_group(trans, inode); | 4386 | btrfs_set_trans_block_group(trans, inode); |
| @@ -4407,7 +4407,7 @@ void btrfs_dirty_inode(struct inode *inode) | |||
| 4407 | if (BTRFS_I(inode)->dummy_inode) | 4407 | if (BTRFS_I(inode)->dummy_inode) |
| 4408 | return; | 4408 | return; |
| 4409 | 4409 | ||
| 4410 | trans = btrfs_join_transaction(root, 1); | 4410 | trans = btrfs_join_transaction(root); |
| 4411 | BUG_ON(IS_ERR(trans)); | 4411 | BUG_ON(IS_ERR(trans)); |
| 4412 | btrfs_set_trans_block_group(trans, inode); | 4412 | btrfs_set_trans_block_group(trans, inode); |
| 4413 | 4413 | ||
| @@ -5226,7 +5226,7 @@ again: | |||
| 5226 | free_extent_map(em); | 5226 | free_extent_map(em); |
| 5227 | em = NULL; | 5227 | em = NULL; |
| 5228 | btrfs_release_path(root, path); | 5228 | btrfs_release_path(root, path); |
| 5229 | trans = btrfs_join_transaction(root, 1); | 5229 | trans = btrfs_join_transaction(root); |
| 5230 | if (IS_ERR(trans)) | 5230 | if (IS_ERR(trans)) |
| 5231 | return ERR_CAST(trans); | 5231 | return ERR_CAST(trans); |
| 5232 | goto again; | 5232 | goto again; |
| @@ -5470,7 +5470,7 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode, | |||
| 5470 | btrfs_drop_extent_cache(inode, start, start + len - 1, 0); | 5470 | btrfs_drop_extent_cache(inode, start, start + len - 1, 0); |
| 5471 | } | 5471 | } |
| 5472 | 5472 | ||
| 5473 | trans = btrfs_join_transaction(root, 0); | 5473 | trans = btrfs_join_transaction(root); |
| 5474 | if (IS_ERR(trans)) | 5474 | if (IS_ERR(trans)) |
| 5475 | return ERR_CAST(trans); | 5475 | return ERR_CAST(trans); |
| 5476 | 5476 | ||
| @@ -5703,7 +5703,7 @@ static int btrfs_get_blocks_direct(struct inode *inode, sector_t iblock, | |||
| 5703 | * to make sure the current transaction stays open | 5703 | * to make sure the current transaction stays open |
| 5704 | * while we look for nocow cross refs | 5704 | * while we look for nocow cross refs |
| 5705 | */ | 5705 | */ |
| 5706 | trans = btrfs_join_transaction(root, 0); | 5706 | trans = btrfs_join_transaction(root); |
| 5707 | if (IS_ERR(trans)) | 5707 | if (IS_ERR(trans)) |
| 5708 | goto must_cow; | 5708 | goto must_cow; |
| 5709 | 5709 | ||
| @@ -5841,7 +5841,7 @@ again: | |||
| 5841 | 5841 | ||
| 5842 | BUG_ON(!ordered); | 5842 | BUG_ON(!ordered); |
| 5843 | 5843 | ||
| 5844 | trans = btrfs_join_transaction(root, 1); | 5844 | trans = btrfs_join_transaction(root); |
| 5845 | if (IS_ERR(trans)) { | 5845 | if (IS_ERR(trans)) { |
| 5846 | err = -ENOMEM; | 5846 | err = -ENOMEM; |
| 5847 | goto out; | 5847 | goto out; |
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2616f7ed4799..908c3d4b48c6 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
| @@ -242,7 +242,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) | |||
| 242 | ip->flags &= ~(BTRFS_INODE_COMPRESS | BTRFS_INODE_NOCOMPRESS); | 242 | ip->flags &= ~(BTRFS_INODE_COMPRESS | BTRFS_INODE_NOCOMPRESS); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | trans = btrfs_join_transaction(root, 1); | 245 | trans = btrfs_join_transaction(root); |
| 246 | BUG_ON(IS_ERR(trans)); | 246 | BUG_ON(IS_ERR(trans)); |
| 247 | 247 | ||
| 248 | ret = btrfs_update_inode(trans, root, inode); | 248 | ret = btrfs_update_inode(trans, root, inode); |
| @@ -2182,7 +2182,7 @@ static long btrfs_ioctl_trans_start(struct file *file) | |||
| 2182 | mutex_unlock(&root->fs_info->trans_mutex); | 2182 | mutex_unlock(&root->fs_info->trans_mutex); |
| 2183 | 2183 | ||
| 2184 | ret = -ENOMEM; | 2184 | ret = -ENOMEM; |
| 2185 | trans = btrfs_start_ioctl_transaction(root, 0); | 2185 | trans = btrfs_start_ioctl_transaction(root); |
| 2186 | if (IS_ERR(trans)) | 2186 | if (IS_ERR(trans)) |
| 2187 | goto out_drop; | 2187 | goto out_drop; |
| 2188 | 2188 | ||
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 199a80134312..8bb256667f2d 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
| @@ -2149,7 +2149,7 @@ again: | |||
| 2149 | err = ret; | 2149 | err = ret; |
| 2150 | } | 2150 | } |
| 2151 | 2151 | ||
| 2152 | trans = btrfs_join_transaction(rc->extent_root, 1); | 2152 | trans = btrfs_join_transaction(rc->extent_root); |
| 2153 | if (IS_ERR(trans)) { | 2153 | if (IS_ERR(trans)) { |
| 2154 | if (!err) | 2154 | if (!err) |
| 2155 | btrfs_block_rsv_release(rc->extent_root, | 2155 | btrfs_block_rsv_release(rc->extent_root, |
| @@ -3233,7 +3233,7 @@ truncate: | |||
| 3233 | goto out; | 3233 | goto out; |
| 3234 | } | 3234 | } |
| 3235 | 3235 | ||
| 3236 | trans = btrfs_join_transaction(root, 0); | 3236 | trans = btrfs_join_transaction(root); |
| 3237 | if (IS_ERR(trans)) { | 3237 | if (IS_ERR(trans)) { |
| 3238 | btrfs_free_path(path); | 3238 | btrfs_free_path(path); |
| 3239 | ret = PTR_ERR(trans); | 3239 | ret = PTR_ERR(trans); |
| @@ -3642,7 +3642,7 @@ int prepare_to_relocate(struct reloc_control *rc) | |||
| 3642 | rc->create_reloc_tree = 1; | 3642 | rc->create_reloc_tree = 1; |
| 3643 | set_reloc_control(rc); | 3643 | set_reloc_control(rc); |
| 3644 | 3644 | ||
| 3645 | trans = btrfs_join_transaction(rc->extent_root, 1); | 3645 | trans = btrfs_join_transaction(rc->extent_root); |
| 3646 | BUG_ON(IS_ERR(trans)); | 3646 | BUG_ON(IS_ERR(trans)); |
| 3647 | btrfs_commit_transaction(trans, rc->extent_root); | 3647 | btrfs_commit_transaction(trans, rc->extent_root); |
| 3648 | return 0; | 3648 | return 0; |
| @@ -3831,7 +3831,7 @@ restart: | |||
| 3831 | btrfs_block_rsv_release(rc->extent_root, rc->block_rsv, (u64)-1); | 3831 | btrfs_block_rsv_release(rc->extent_root, rc->block_rsv, (u64)-1); |
| 3832 | 3832 | ||
| 3833 | /* get rid of pinned extents */ | 3833 | /* get rid of pinned extents */ |
| 3834 | trans = btrfs_join_transaction(rc->extent_root, 1); | 3834 | trans = btrfs_join_transaction(rc->extent_root); |
| 3835 | if (IS_ERR(trans)) | 3835 | if (IS_ERR(trans)) |
| 3836 | err = PTR_ERR(trans); | 3836 | err = PTR_ERR(trans); |
| 3837 | else | 3837 | else |
| @@ -4156,7 +4156,7 @@ int btrfs_recover_relocation(struct btrfs_root *root) | |||
| 4156 | 4156 | ||
| 4157 | set_reloc_control(rc); | 4157 | set_reloc_control(rc); |
| 4158 | 4158 | ||
| 4159 | trans = btrfs_join_transaction(rc->extent_root, 1); | 4159 | trans = btrfs_join_transaction(rc->extent_root); |
| 4160 | if (IS_ERR(trans)) { | 4160 | if (IS_ERR(trans)) { |
| 4161 | unset_reloc_control(rc); | 4161 | unset_reloc_control(rc); |
| 4162 | err = PTR_ERR(trans); | 4162 | err = PTR_ERR(trans); |
| @@ -4190,7 +4190,7 @@ int btrfs_recover_relocation(struct btrfs_root *root) | |||
| 4190 | 4190 | ||
| 4191 | unset_reloc_control(rc); | 4191 | unset_reloc_control(rc); |
| 4192 | 4192 | ||
| 4193 | trans = btrfs_join_transaction(rc->extent_root, 1); | 4193 | trans = btrfs_join_transaction(rc->extent_root); |
| 4194 | if (IS_ERR(trans)) | 4194 | if (IS_ERR(trans)) |
| 4195 | err = PTR_ERR(trans); | 4195 | err = PTR_ERR(trans); |
| 4196 | else | 4196 | else |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index c571734d5e5a..70bfb26df967 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
| @@ -257,22 +257,19 @@ struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root, | |||
| 257 | { | 257 | { |
| 258 | return start_transaction(root, num_items, TRANS_START); | 258 | return start_transaction(root, num_items, TRANS_START); |
| 259 | } | 259 | } |
| 260 | struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root, | 260 | struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root) |
| 261 | int num_blocks) | ||
| 262 | { | 261 | { |
| 263 | return start_transaction(root, 0, TRANS_JOIN); | 262 | return start_transaction(root, 0, TRANS_JOIN); |
| 264 | } | 263 | } |
| 265 | 264 | ||
| 266 | struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root, | 265 | struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root) |
| 267 | int num_blocks) | ||
| 268 | { | 266 | { |
| 269 | return start_transaction(root, 0, TRANS_JOIN_NOLOCK); | 267 | return start_transaction(root, 0, TRANS_JOIN_NOLOCK); |
| 270 | } | 268 | } |
| 271 | 269 | ||
| 272 | struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *r, | 270 | struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *root) |
| 273 | int num_blocks) | ||
| 274 | { | 271 | { |
| 275 | return start_transaction(r, 0, TRANS_USERSPACE); | 272 | return start_transaction(root, 0, TRANS_USERSPACE); |
| 276 | } | 273 | } |
| 277 | 274 | ||
| 278 | /* wait for a transaction commit to be fully complete */ | 275 | /* wait for a transaction commit to be fully complete */ |
| @@ -1171,7 +1168,7 @@ int btrfs_commit_transaction_async(struct btrfs_trans_handle *trans, | |||
| 1171 | 1168 | ||
| 1172 | INIT_DELAYED_WORK(&ac->work, do_async_commit); | 1169 | INIT_DELAYED_WORK(&ac->work, do_async_commit); |
| 1173 | ac->root = root; | 1170 | ac->root = root; |
| 1174 | ac->newtrans = btrfs_join_transaction(root, 0); | 1171 | ac->newtrans = btrfs_join_transaction(root); |
| 1175 | if (IS_ERR(ac->newtrans)) { | 1172 | if (IS_ERR(ac->newtrans)) { |
| 1176 | int err = PTR_ERR(ac->newtrans); | 1173 | int err = PTR_ERR(ac->newtrans); |
| 1177 | kfree(ac); | 1174 | kfree(ac); |
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index e441acc6c584..1f573f09dba2 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h | |||
| @@ -92,12 +92,9 @@ int btrfs_end_transaction_nolock(struct btrfs_trans_handle *trans, | |||
| 92 | struct btrfs_root *root); | 92 | struct btrfs_root *root); |
| 93 | struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root, | 93 | struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root, |
| 94 | int num_items); | 94 | int num_items); |
| 95 | struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root, | 95 | struct btrfs_trans_handle *btrfs_join_transaction(struct btrfs_root *root); |
| 96 | int num_blocks); | 96 | struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root); |
| 97 | struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root, | 97 | struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *root); |
| 98 | int num_blocks); | ||
| 99 | struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *r, | ||
| 100 | int num_blocks); | ||
| 101 | int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid); | 98 | int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid); |
| 102 | int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans, | 99 | int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans, |
| 103 | struct btrfs_root *root); | 100 | struct btrfs_root *root); |
