summaryrefslogtreecommitdiff
path: root/fs/btrfs/ordered-data.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-06-30 19:04:02 +0300
committerDavid Sterba <dsterba@suse.com>2020-12-08 17:54:00 +0300
commit713cebfb98915201a43ff4d01b0dbafecd50d8ae (patch)
tree1cedb3cf2a5359f452468cb20b3add52359c33af /fs/btrfs/ordered-data.h
parent223486c27b369a10ceb6180c40d7aa354e903446 (diff)
downloadlinux-713cebfb98915201a43ff4d01b0dbafecd50d8ae.tar.xz
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>
Diffstat (limited to 'fs/btrfs/ordered-data.h')
-rw-r--r--fs/btrfs/ordered-data.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index e48810104e4a..367269effd6a 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -137,9 +137,8 @@ static inline int btrfs_ordered_sum_size(struct btrfs_fs_info *fs_info,
unsigned long bytes)
{
int num_sectors = (int)DIV_ROUND_UP(bytes, fs_info->sectorsize);
- const u32 csum_size = fs_info->csum_size;
- return sizeof(struct btrfs_ordered_sum) + num_sectors * csum_size;
+ return sizeof(struct btrfs_ordered_sum) + num_sectors * fs_info->csum_size;
}
static inline void