Commit 569ae920 authored by Chengguang Xu's avatar Chengguang Xu Committed by Jan Kara

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: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent c0ed7b51
...@@ -148,10 +148,9 @@ static void ext2_put_super (struct super_block * sb) ...@@ -148,10 +148,9 @@ static void ext2_put_super (struct super_block * sb)
ext2_quota_off_umount(sb); ext2_quota_off_umount(sb);
if (sbi->s_ea_block_cache) { ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
ext2_xattr_destroy_cache(sbi->s_ea_block_cache); sbi->s_ea_block_cache = NULL;
sbi->s_ea_block_cache = NULL;
}
if (!sb_rdonly(sb)) { if (!sb_rdonly(sb)) {
struct ext2_super_block *es = sbi->s_es; struct ext2_super_block *es = sbi->s_es;
...@@ -1197,8 +1196,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -1197,8 +1196,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
sb->s_id); sb->s_id);
goto failed_mount; goto failed_mount;
failed_mount3: failed_mount3:
if (sbi->s_ea_block_cache) ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
percpu_counter_destroy(&sbi->s_freeblocks_counter); percpu_counter_destroy(&sbi->s_freeblocks_counter);
percpu_counter_destroy(&sbi->s_freeinodes_counter); percpu_counter_destroy(&sbi->s_freeinodes_counter);
percpu_counter_destroy(&sbi->s_dirs_counter); percpu_counter_destroy(&sbi->s_dirs_counter);
......
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