diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 34 |
1 files changed, 17 insertions, 17 deletions
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; |