Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext2: remove redundant condition check

ext2_xattr_destroy_cache() can handle NULL pointer correctly,
so there is no need to check NULL pointer before calling
ext2_xattr_destroy_cache().

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Chengguang Xu and committed by
Jan Kara
569ae920 c0ed7b51

+4 -6
+4 -6
fs/ext2/super.c
··· 148 148 149 149 ext2_quota_off_umount(sb); 150 150 151 - if (sbi->s_ea_block_cache) { 152 - ext2_xattr_destroy_cache(sbi->s_ea_block_cache); 153 - sbi->s_ea_block_cache = NULL; 154 - } 151 + ext2_xattr_destroy_cache(sbi->s_ea_block_cache); 152 + sbi->s_ea_block_cache = NULL; 153 + 155 154 if (!sb_rdonly(sb)) { 156 155 struct ext2_super_block *es = sbi->s_es; 157 156 ··· 1196 1197 sb->s_id); 1197 1198 goto failed_mount; 1198 1199 failed_mount3: 1199 - if (sbi->s_ea_block_cache) 1200 - ext2_xattr_destroy_cache(sbi->s_ea_block_cache); 1200 + ext2_xattr_destroy_cache(sbi->s_ea_block_cache); 1201 1201 percpu_counter_destroy(&sbi->s_freeblocks_counter); 1202 1202 percpu_counter_destroy(&sbi->s_freeinodes_counter); 1203 1203 percpu_counter_destroy(&sbi->s_dirs_counter);