]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: replace btrfs_io_bio::end_io with a simple helper
authorDavid Sterba <dsterba@suse.com>
Thu, 22 Nov 2018 16:16:49 +0000 (17:16 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:40 +0000 (14:51 +0100)
commit93fe97906175796547a407ddbd65b2d648cb1492
tree10898fe39a7737103169898b38a753db0b92aded
parent419f12aaa3e6ac46ebaca254bd179cd8a14c6701
btrfs: replace btrfs_io_bio::end_io with a simple helper

The end_io callback implemented as btrfs_io_bio_endio_readpage only
calls kfree. Also the callback is set only in case the csum buffer is
allocated and not pointing to the inline buffer. We can use that
information to drop the indirection and call a helper that will free the
csums only in the right case.

This shrinks struct btrfs_io_bio by 8 bytes.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/file-item.c
fs/btrfs/inode.c
fs/btrfs/volumes.h