]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove redundant csum buffer in btrfs_io_bio
authorDavid Sterba <dsterba@suse.com>
Thu, 22 Nov 2018 16:16:46 +0000 (17:16 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:40 +0000 (14:51 +0100)
commit8cf710aae93d0eb8e799f862ede9e96d445b8079
tree4694a109291d4c7f4a0b2c99974e56edcc8c5d8d
parentbce700f1570fc6b76676e1455f6e96b9c92f2e08
btrfs: remove redundant csum buffer in btrfs_io_bio

The io_bio tracks checksums and has an inline buffer or an allocated
one. And there's a third member that points to the right one, but we
don't need to use an extra pointer for that. Let btrfs_io_bio::csum
point to the right buffer and check that the inline buffer is not
accidentally freed.

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/file-item.c
fs/btrfs/volumes.h