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)
commit31fecccbd7b2174487a6b7361153b60a4eda6108
tree4694a109291d4c7f4a0b2c99974e56edcc8c5d8d
parent600b6cf468b038798313da42d2438c10bcb10261
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