ext4: use 'sbi' instead of 'EXT4_SB(sb)'
We could use 'sbi' instead of 'EXT4_SB(sb)' to make code more elegant. Signed-off-by: Jun Piao <piaojun@huawei.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Jan Kara <jack@suse.cz>
This commit is contained in:
@@ -2677,7 +2677,7 @@ static ext4_fsblk_t descriptor_loc(struct super_block *sb,
|
||||
* compensate.
|
||||
*/
|
||||
if (sb->s_blocksize == 1024 && nr == 0 &&
|
||||
le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block) == 0)
|
||||
le32_to_cpu(sbi->s_es->s_first_data_block) == 0)
|
||||
has_super++;
|
||||
|
||||
return (has_super + ext4_group_first_block_no(sb, bg));
|
||||
@@ -3122,7 +3122,7 @@ int ext4_register_li_request(struct super_block *sb,
|
||||
{
|
||||
struct ext4_sb_info *sbi = EXT4_SB(sb);
|
||||
struct ext4_li_request *elr = NULL;
|
||||
ext4_group_t ngroups = EXT4_SB(sb)->s_groups_count;
|
||||
ext4_group_t ngroups = sbi->s_groups_count;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&ext4_li_mtx);
|
||||
@@ -4837,7 +4837,7 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
|
||||
bool needs_barrier = false;
|
||||
struct ext4_sb_info *sbi = EXT4_SB(sb);
|
||||
|
||||
if (unlikely(ext4_forced_shutdown(EXT4_SB(sb))))
|
||||
if (unlikely(ext4_forced_shutdown(sbi)))
|
||||
return 0;
|
||||
|
||||
trace_ext4_sync_fs(sb, wait);
|
||||
|
Reference in New Issue
Block a user