diff options
author | David Sterba <dsterba@suse.com> | 2020-07-01 22:19:09 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-08 17:53:58 +0300 |
commit | 265fdfa6ce0a79df3b880bbf39d9a00a0435687f (patch) | |
tree | d17cb9236e996f9f149bde5ac146f11016239538 /fs/btrfs/super.c | |
parent | 098e63082b9bd26b61a57310385efc3e9f363dea (diff) | |
download | linux-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/super.c')
-rw-r--r-- | fs/btrfs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 9f51b0a22b14..bdb0b0c5fd64 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2205,7 +2205,7 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) u64 total_used = 0; u64 total_free_data = 0; u64 total_free_meta = 0; - int bits = dentry->d_sb->s_blocksize_bits; + u32 bits = fs_info->sectorsize_bits; __be32 *fsid = (__be32 *)fs_info->fs_devices->fsid; unsigned factor = 1; struct btrfs_block_rsv *block_rsv = &fs_info->global_block_rsv; |