diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-11-14 07:23:53 +0800 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-11-14 13:14:56 +0100 |
commit | 569ae9209425560e1a94114231d0782e1cc19df1 (patch) | |
tree | 8196679aaf7c3b4a905db540dc973281f7383fad /fs/ext2/super.c | |
parent | c0ed7b51ca9983086e03668f0ca20dc67ac663f4 (diff) |
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>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 5e2861b947a6..94cd10c463c2 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -148,10 +148,9 @@ static void ext2_put_super (struct super_block * sb) ext2_quota_off_umount(sb); - if (sbi->s_ea_block_cache) { - ext2_xattr_destroy_cache(sbi->s_ea_block_cache); - sbi->s_ea_block_cache = NULL; - } + ext2_xattr_destroy_cache(sbi->s_ea_block_cache); + sbi->s_ea_block_cache = NULL; + if (!sb_rdonly(sb)) { struct ext2_super_block *es = sbi->s_es; @@ -1197,8 +1196,7 @@ cantfind_ext2: sb->s_id); goto failed_mount; 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_freeinodes_counter); percpu_counter_destroy(&sbi->s_dirs_counter); |