aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-11-15 03:14:11 -0500
committerJosef Bacik <jbacik@fusionio.com>2013-02-20 09:36:35 -0500
commit7b5a1c5310a50abc96c9ca07039688027d0a4282 (patch)
tree7d6c7ddc1f24ac56af6b96ed833874bab2fcdf0e
parent78a6184a3ff9041280ee56273c01e5679a831b39 (diff)
Btrfs: cleanup unnecessary clear when freeing a transaction or a trans handle
We clear the transaction object and the trans handle when they are about to be freed, it is unnecessary, cleanup it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
-rw-r--r--fs/btrfs/transaction.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index fc03aa60b684..a1455f1e4676 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -40,7 +40,6 @@ void put_transaction(struct btrfs_transaction *transaction)
40 if (atomic_dec_and_test(&transaction->use_count)) { 40 if (atomic_dec_and_test(&transaction->use_count)) {
41 BUG_ON(!list_empty(&transaction->list)); 41 BUG_ON(!list_empty(&transaction->list));
42 WARN_ON(transaction->delayed_refs.root.rb_node); 42 WARN_ON(transaction->delayed_refs.root.rb_node);
43 memset(transaction, 0, sizeof(*transaction));
44 kmem_cache_free(btrfs_transaction_cachep, transaction); 43 kmem_cache_free(btrfs_transaction_cachep, transaction);
45 } 44 }
46} 45}
@@ -650,7 +649,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
650 } 649 }
651 assert_qgroups_uptodate(trans); 650 assert_qgroups_uptodate(trans);
652 651
653 memset(trans, 0, sizeof(*trans));
654 kmem_cache_free(btrfs_trans_handle_cachep, trans); 652 kmem_cache_free(btrfs_trans_handle_cachep, trans);
655 return err; 653 return err;
656} 654}