From 497f9742945d30967efef1c123ad8efad721bb14 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 9 Feb 2017 17:24:50 +0100 Subject: [PATCH] btrfs-progs: opencode trivial helper btrfs_free_transaction It also does not exist in kernel code. Signed-off-by: David Sterba --- disk-io.c | 4 ++-- transaction.h | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/disk-io.c b/disk-io.c index 318128c..f182a1d 100644 --- a/disk-io.c +++ b/disk-io.c @@ -617,7 +617,7 @@ commit_tree: write_ctree_super(trans, root); btrfs_finish_extent_commit(trans, fs_info->extent_root, &fs_info->pinned_extents); - btrfs_free_transaction(root, trans); + kfree(trans); free_extent_buffer(root->commit_root); root->commit_root = 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); BUG_ON(ret); write_ctree_super(trans, root); - btrfs_free_transaction(root, trans); + kfree(trans); } if (fs_info->finalize_on_close) { diff --git a/transaction.h b/transaction.h index 13e09a6..0c41af5 100644 --- a/transaction.h +++ b/transaction.h @@ -54,11 +54,4 @@ btrfs_start_transaction(struct btrfs_root *root, int num_blocks) 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 -- 2.7.4