btrfs: Simplify btrfs_check_super_csum() and get rid of size assumptions
authorJohannes Thumshirn <jthumshirn@suse.de>
Mon, 3 Jun 2019 14:58:55 +0000 (16:58 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:35:01 +0000 (13:35 +0200)
commit51bce6c9b97729835bb55ceb37febd5c8fa962dd
treeb45b55b970701ec22c84e2c537db72c9d21debd7
parent8dc3f22c8ba02c5a5b889406259c50b3eaa61c65
btrfs: Simplify btrfs_check_super_csum() and get rid of size assumptions

Now that we have already checked for a valid checksum type before
calling btrfs_check_super_csum(), it can be simplified even further.

While at it get rid of the implicit size assumption of the resulting
checksum as well.

This is a preparation for changing all checksum functionality to use the
crypto layer later.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c