diff options
Diffstat (limited to 'fs/btrfs/transaction.c')
-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 ce48eb59d615..5b158da7e0bb 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -197,6 +197,7 @@ again: | |||
197 | 197 | ||
198 | ret = join_transaction(root); | 198 | ret = join_transaction(root); |
199 | if (ret < 0) { | 199 | if (ret < 0) { |
200 | kmem_cache_free(btrfs_trans_handle_cachep, h); | ||
200 | if (type != TRANS_JOIN_NOLOCK) | 201 | if (type != TRANS_JOIN_NOLOCK) |
201 | mutex_unlock(&root->fs_info->trans_mutex); | 202 | mutex_unlock(&root->fs_info->trans_mutex); |
202 | return ERR_PTR(ret); | 203 | return ERR_PTR(ret); |
@@ -975,6 +976,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, | |||
975 | record_root_in_trans(trans, root); | 976 | record_root_in_trans(trans, root); |
976 | btrfs_set_root_last_snapshot(&root->root_item, trans->transid); | 977 | btrfs_set_root_last_snapshot(&root->root_item, trans->transid); |
977 | memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); | 978 | memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); |
979 | btrfs_check_and_init_root_item(new_root_item); | ||
978 | 980 | ||
979 | root_flags = btrfs_root_flags(new_root_item); | 981 | root_flags = btrfs_root_flags(new_root_item); |
980 | if (pending->readonly) | 982 | if (pending->readonly) |