mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-11 03:31:17 +00:00
btrfs-progs: opencode trivial helper btrfs_free_transaction
It also does not exist in kernel code. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
4999d033d3
commit
497f974294
@ -617,7 +617,7 @@ commit_tree:
|
|||||||
write_ctree_super(trans, root);
|
write_ctree_super(trans, root);
|
||||||
btrfs_finish_extent_commit(trans, fs_info->extent_root,
|
btrfs_finish_extent_commit(trans, fs_info->extent_root,
|
||||||
&fs_info->pinned_extents);
|
&fs_info->pinned_extents);
|
||||||
btrfs_free_transaction(root, trans);
|
kfree(trans);
|
||||||
free_extent_buffer(root->commit_root);
|
free_extent_buffer(root->commit_root);
|
||||||
root->commit_root = NULL;
|
root->commit_root = NULL;
|
||||||
fs_info->running_transaction = NULL;
|
fs_info->running_transaction = NULL;
|
||||||
@ -1801,7 +1801,7 @@ int close_ctree_fs_info(struct btrfs_fs_info *fs_info)
|
|||||||
ret = __commit_transaction(trans, root);
|
ret = __commit_transaction(trans, root);
|
||||||
BUG_ON(ret);
|
BUG_ON(ret);
|
||||||
write_ctree_super(trans, root);
|
write_ctree_super(trans, root);
|
||||||
btrfs_free_transaction(root, trans);
|
kfree(trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs_info->finalize_on_close) {
|
if (fs_info->finalize_on_close) {
|
||||||
|
@ -54,11 +54,4 @@ btrfs_start_transaction(struct btrfs_root *root, int num_blocks)
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void btrfs_free_transaction(struct btrfs_root *root,
|
|
||||||
struct btrfs_trans_handle *handle)
|
|
||||||
{
|
|
||||||
memset(handle, 0, sizeof(*handle));
|
|
||||||
free(handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user