]> 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)
commit036542bd7158a3fd9bcfaa10c10f5bf0d044f645
tree10898fe39a7737103169898b38a753db0b92aded
parent8cf710aae93d0eb8e799f862ede9e96d445b8079
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