From: Miao Xie Date: Thu, 15 Nov 2012 08:14:11 +0000 (+0000) Subject: Btrfs: cleanup unnecessary clear when freeing a transaction or a trans handle X-Git-Tag: v3.12-rc1~1062^2~57^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b5a1c5310a50abc96c9ca07039688027d0a4282;p=kernel%2Fkernel-generic.git 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 --- diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index fc03aa6..a1455f1 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -40,7 +40,6 @@ void put_transaction(struct btrfs_transaction *transaction) if (atomic_dec_and_test(&transaction->use_count)) { BUG_ON(!list_empty(&transaction->list)); WARN_ON(transaction->delayed_refs.root.rb_node); - memset(transaction, 0, sizeof(*transaction)); kmem_cache_free(btrfs_transaction_cachep, transaction); } } @@ -650,7 +649,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, } assert_qgroups_uptodate(trans); - memset(trans, 0, sizeof(*trans)); kmem_cache_free(btrfs_trans_handle_cachep, trans); return err; }