OSDN Git Service

btrfs: use struct_size to calculate size of raid hash table
authorDavid Sterba <dsterba@suse.com>
Fri, 29 Mar 2019 01:07:02 +0000 (02:07 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:44 +0000 (17:01 +0100)
commitee787f9550534612a4694cc4ec9f2d397d4b5752
tree240e8387a5bc65dc5236e686e8a5893b6e95e0f5
parentdcc3eb9638c3c927f1597075e851d0a16300a876
btrfs: use struct_size to calculate size of raid hash table

The struct_size macro does the same calculation and is safe regarding
overflows. Though we're not expecting them to happen, use the helper for
clarity.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c