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)
commitb3a0dd50c3951ec1b9a12ec39034194022fd8693
tree10898fe39a7737103169898b38a753db0b92aded
parent31fecccbd7b2174487a6b7361153b60a4eda6108
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