]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: trimming some start_transaction() code away
authorAlexandru Moise <00moses.alexander00@gmail.com>
Thu, 27 Aug 2015 23:53:45 +0000 (23:53 +0000)
committerChuck Anderson <chuck.anderson@oracle.com>
Tue, 28 Feb 2017 04:50:32 +0000 (20:50 -0800)
commit11459eae38fe0babb927009bb3a484b0c036eb26
treef65f361ef4e31f4a0ac71287d85e12064585dab9
parente9aa31954a5524bddec1738def85a88160478242
btrfs: trimming some start_transaction() code away

Orabug: 25615755

Just call kmem_cache_zalloc() instead of calling kmem_cache_alloc().
We're just initializing most fields to 0, false and NULL later on
_anyway_, so to make the code mode readable and potentially gain
a bit of performance (completely untested claim), we should fill our
btrfs_trans_handle with zeros on allocation then just initialize
those five remaining fields (not counting the list_heads) as normal.

Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit f2f767e7345dfe56102d6809f647ba38a238f718)
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
 Conflicts:
fs/btrfs/transaction.c
fs/btrfs/transaction.c