diff options
-rw-r--r-- | fs/btrfs/transaction.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index a83d486cc70c..4330433b7b4f 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -1123,6 +1123,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
1123 | 1123 | ||
1124 | rsv = trans->block_rsv; | 1124 | rsv = trans->block_rsv; |
1125 | trans->block_rsv = &pending->block_rsv; | 1125 | trans->block_rsv = &pending->block_rsv; |
1126 | trans->bytes_reserved = trans->block_rsv->reserved; | ||
1126 | 1127 | ||
1127 | dentry = pending->dentry; | 1128 | dentry = pending->dentry; |
1128 | parent = dget_parent(dentry); | 1129 | parent = dget_parent(dentry); |
@@ -1276,6 +1277,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
1276 | fail: | 1277 | fail: |
1277 | dput(parent); | 1278 | dput(parent); |
1278 | trans->block_rsv = rsv; | 1279 | trans->block_rsv = rsv; |
1280 | trans->bytes_reserved = 0; | ||
1279 | no_free_objectid: | 1281 | no_free_objectid: |
1280 | kfree(new_root_item); | 1282 | kfree(new_root_item); |
1281 | root_item_alloc_fail: | 1283 | root_item_alloc_fail: |