Commit 784a0995 authored by Lv Ruyi's avatar Lv Ruyi Committed by Theodore Ts'o

ext4: remove unnecessary conditionals

iput() has already handled null and non-null parameter, so it is no
need to use if().
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarLv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220411032337.2517465-1-lv.ruyi@zte.com.cnSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent af2b3275
...@@ -1659,8 +1659,7 @@ static int ext4_fc_replay_create(struct super_block *sb, struct ext4_fc_tl *tl, ...@@ -1659,8 +1659,7 @@ static int ext4_fc_replay_create(struct super_block *sb, struct ext4_fc_tl *tl,
set_nlink(inode, 1); set_nlink(inode, 1);
ext4_mark_inode_dirty(NULL, inode); ext4_mark_inode_dirty(NULL, inode);
out: out:
if (inode) iput(inode);
iput(inode);
return ret; return ret;
} }
......
...@@ -3363,8 +3363,7 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir, ...@@ -3363,8 +3363,7 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir,
err = ext4_add_nondir(handle, dentry, &inode); err = ext4_add_nondir(handle, dentry, &inode);
if (handle) if (handle)
ext4_journal_stop(handle); ext4_journal_stop(handle);
if (inode) iput(inode);
iput(inode);
goto out_free_encrypted_link; goto out_free_encrypted_link;
err_drop_inode: err_drop_inode:
......
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