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 66e4c66cc63b..abbec80aaa44 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -179,7 +179,6 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root,
179{ 179{
180 struct btrfs_trans_handle *h; 180 struct btrfs_trans_handle *h;
181 struct btrfs_transaction *cur_trans; 181 struct btrfs_transaction *cur_trans;
182 int retries = 0;
183 int ret; 182 int ret;
184again: 183again:
185 h = kmem_cache_alloc(btrfs_trans_handle_cachep, GFP_NOFS); 184 h = kmem_cache_alloc(btrfs_trans_handle_cachep, GFP_NOFS);
@@ -212,8 +211,7 @@ again:
212 } 211 }
213 212
214 if (num_items > 0) { 213 if (num_items > 0) {
215 ret = btrfs_trans_reserve_metadata(h, root, num_items, 214 ret = btrfs_trans_reserve_metadata(h, root, num_items);
216 &retries);
217 if (ret == -EAGAIN) { 215 if (ret == -EAGAIN) {
218 btrfs_commit_transaction(h, root); 216 btrfs_commit_transaction(h, root);
219 goto again; 217 goto again;
@@ -836,7 +834,6 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
836 struct extent_buffer *tmp; 834 struct extent_buffer *tmp;
837 struct extent_buffer *old; 835 struct extent_buffer *old;
838 int ret; 836 int ret;
839 int retries = 0;
840 u64 to_reserve = 0; 837 u64 to_reserve = 0;
841 u64 index = 0; 838 u64 index = 0;
842 u64 objectid; 839 u64 objectid;
@@ -858,7 +855,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
858 855
859 if (to_reserve > 0) { 856 if (to_reserve > 0) {
860 ret = btrfs_block_rsv_add(trans, root, &pending->block_rsv, 857 ret = btrfs_block_rsv_add(trans, root, &pending->block_rsv,
861 to_reserve, &retries); 858 to_reserve);
862 if (ret) { 859 if (ret) {
863 pending->error = ret; 860 pending->error = ret;
864 goto fail; 861 goto fail;