]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Sterba <dsterba@suse.com>
Wed, 21 Oct 2015 16:28:48 +0000 (18:28 +0200)
commit28e67c4ea2436b9d89fae21927c0d890921339e2
treefc4496756c4c99ca7b08dbfa47c3d0f70b2aed62
parentd4be51e0a16bca151beeb71db0d1bdfeaead2aa0
btrfs: trimming some start_transaction() code away

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>
fs/btrfs/transaction.c