From: Tao Ma Date: Sat, 23 Jul 2011 20:07:26 +0000 (-0400) Subject: ext4: remove unnecessary ext4_get_group_info in ext4_mb_load_buddy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=529da704ad1ead755d9e40721f29446cb278e099;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ext4: remove unnecessary ext4_get_group_info in ext4_mb_load_buddy ext4_mb_load_buddy() calls ext4_get_group_info() for setting both "grp" and "e4b->bd_info", but it could do "e4b->bd_info = grp". Reported-by: Andreas Dilger Signed-off-by: Tao Ma Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 037f680b76f9..447c0f3384ab 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1126,7 +1126,7 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group, grp = ext4_get_group_info(sb, group); e4b->bd_blkbits = sb->s_blocksize_bits; - e4b->bd_info = ext4_get_group_info(sb, group); + e4b->bd_info = grp; e4b->bd_sb = sb; e4b->bd_group = group; e4b->bd_buddy_page = NULL;