btrfs: remove unnecessary local variables for checksum size

Remove local variable that is then used just once and replace it with
fs_info::csum_size.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2020-06-30 18:04:02 +02:00
parent 223486c27b
commit 713cebfb98
4 changed files with 5 additions and 10 deletions

View File

@@ -454,7 +454,6 @@ static int csum_dirty_buffer(struct btrfs_fs_info *fs_info, struct page *page)
u64 start = page_offset(page);
u64 found_start;
u8 result[BTRFS_CSUM_SIZE];
const u32 csum_size = fs_info->csum_size;
struct extent_buffer *eb;
int ret;
@@ -491,7 +490,7 @@ static int csum_dirty_buffer(struct btrfs_fs_info *fs_info, struct page *page)
WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG));
return ret;
}
write_extent_buffer(eb, result, 0, csum_size);
write_extent_buffer(eb, result, 0, fs_info->csum_size);
return 0;
}