diff options
author | Chengguang Xu <cgxu519@mykernel.net> | 2019-11-15 23:49:00 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-11-19 17:04:38 +0100 |
commit | 545886fead7abfdbeb46d3ac62256e1db72739a3 (patch) | |
tree | 02e5d0f32f3bf07b3f19df3c71514b68103f6458 /fs/ext2 | |
parent | fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long (diff) | |
download | linux-545886fead7abfdbeb46d3ac62256e1db72739a3.tar.xz linux-545886fead7abfdbeb46d3ac62256e1db72739a3.zip |
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.net
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/super.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 4cd401a2f207..bcffe25da2f0 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -800,7 +800,6 @@ static unsigned long descriptor_loc(struct super_block *sb, { struct ext2_sb_info *sbi = EXT2_SB(sb); unsigned long bg, first_meta_bg; - int has_super = 0; 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, nr < first_meta_bg) return (logic_sb_block + nr + 1); 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) |