Commit 545886fe authored by Chengguang Xu's avatar Chengguang Xu Committed by Jan Kara

ext2: code cleanup for descriptor_loc()

Code cleanup by removing unnecessary variable
in descriptor_loc().

Link: https://lore.kernel.org/r/20191115224900.2613-1-cgxu519@mykernel.netSigned-off-by: default avatarChengguang Xu <cgxu519@mykernel.net>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 6fcbcec9
...@@ -800,7 +800,6 @@ static unsigned long descriptor_loc(struct super_block *sb, ...@@ -800,7 +800,6 @@ static unsigned long descriptor_loc(struct super_block *sb,
{ {
struct ext2_sb_info *sbi = EXT2_SB(sb); struct ext2_sb_info *sbi = EXT2_SB(sb);
unsigned long bg, first_meta_bg; unsigned long bg, first_meta_bg;
int has_super = 0;
first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg); first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg);
...@@ -808,10 +807,8 @@ static unsigned long descriptor_loc(struct super_block *sb, ...@@ -808,10 +807,8 @@ static unsigned long descriptor_loc(struct super_block *sb,
nr < first_meta_bg) nr < first_meta_bg)
return (logic_sb_block + nr + 1); return (logic_sb_block + nr + 1);
bg = sbi->s_desc_per_block * nr; bg = sbi->s_desc_per_block * nr;
if (ext2_bg_has_super(sb, bg))
has_super = 1;
return ext2_group_first_block_no(sb, bg) + has_super; return ext2_group_first_block_no(sb, bg) + ext2_bg_has_super(sb, bg);
} }
static int ext2_fill_super(struct super_block *sb, void *data, int silent) static int ext2_fill_super(struct super_block *sb, void *data, int silent)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment