aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index e7144c48ed79..325d9a5f0128 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -180,7 +180,6 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root,
180{ 180{
181 struct btrfs_trans_handle *h; 181 struct btrfs_trans_handle *h;
182 struct btrfs_transaction *cur_trans; 182 struct btrfs_transaction *cur_trans;
183 int retries = 0;
184 int ret; 183 int ret;
185again: 184again:
186 h = kmem_cache_alloc(btrfs_trans_handle_cachep, GFP_NOFS); 185 h = kmem_cache_alloc(btrfs_trans_handle_cachep, GFP_NOFS);
@@ -215,8 +214,7 @@ again:
215 } 214 }
216 215
217 if (num_items > 0) { 216 if (num_items > 0) {
218 ret = btrfs_trans_reserve_metadata(h, root, num_items, 217 ret = btrfs_trans_reserve_metadata(h, root, num_items);
219 &retries);
220 if (ret == -EAGAIN) { 218 if (ret == -EAGAIN) {
221 btrfs_commit_transaction(h, root); 219 btrfs_commit_transaction(h, root);
222 goto again; 220 goto again;
@@ -855,7 +853,6 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
855 struct extent_buffer *tmp; 853 struct extent_buffer *tmp;
856 struct extent_buffer *old; 854 struct extent_buffer *old;
857 int ret; 855 int ret;
858 int retries = 0;
859 u64 to_reserve = 0; 856 u64 to_reserve = 0;
860 u64 index = 0; 857 u64 index = 0;
861 u64 objectid; 858 u64 objectid;
@@ -877,7 +874,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
877 874
878 if (to_reserve > 0) { 875 if (to_reserve > 0) {
879 ret = btrfs_block_rsv_add(trans, root, &pending->block_rsv, 876 ret = btrfs_block_rsv_add(trans, root, &pending->block_rsv,
880 to_reserve, &retries); 877 to_reserve);
881 if (ret) { 878 if (ret) {
882 pending->error = ret; 879 pending->error = ret;
883 goto fail; 880 goto fail;