summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-07-01 22:19:09 +0300
committerDavid Sterba <dsterba@suse.com>2020-12-08 17:53:58 +0300
commit265fdfa6ce0a79df3b880bbf39d9a00a0435687f (patch)
treed17cb9236e996f9f149bde5ac146f11016239538 /fs/btrfs/file.c
parent098e63082b9bd26b61a57310385efc3e9f363dea (diff)
downloadlinux-265fdfa6ce0a79df3b880bbf39d9a00a0435687f.tar.xz
btrfs: replace s_blocksize_bits with fs_info::sectorsize_bits
The value of super_block::s_blocksize_bits is the same as fs_info::sectorsize_bits, but we don't need to do the extra dereferences in many functions and storing the bits as u32 (in fs_info) generates shorter assembly. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 5b93f0bb8654..5abdc7332dfc 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1799,8 +1799,7 @@ again:
if (num_sectors > dirty_sectors) {
/* release everything except the sectors we dirtied */
- release_bytes -= dirty_sectors <<
- fs_info->sb->s_blocksize_bits;
+ release_bytes -= dirty_sectors << fs_info->sectorsize_bits;
if (only_release_metadata) {
btrfs_delalloc_release_metadata(BTRFS_I(inode),
release_bytes, true);