diff options
author | Lv Ruyi <lv.ruyi@zte.com.cn> | 2022-04-11 03:23:37 +0000 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-05-13 16:27:24 -0400 |
commit | 784a09951c1d8383498c0df091a37db612bebfc7 (patch) | |
tree | 08d4a3e48f2eb2bc7130b18c3f76ccdb5b926c2e /fs/ext4/namei.c | |
parent | af2b327581582a959f1923eca9cafee5b29a7399 (diff) | |
download | linux-stable-784a09951c1d8383498c0df091a37db612bebfc7.tar.gz linux-stable-784a09951c1d8383498c0df091a37db612bebfc7.tar.bz2 linux-stable-784a09951c1d8383498c0df091a37db612bebfc7.zip |
ext4: remove unnecessary conditionals
iput() has already handled null and non-null parameter, so it is no
need to use if().
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220411032337.2517465-1-lv.ruyi@zte.com.cn
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/namei.c')
-rw-r--r-- | fs/ext4/namei.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 5675d3b38032..dfe5514035c1 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -3363,8 +3363,7 @@ static int ext4_symlink(struct user_namespace *mnt_userns, struct inode *dir, err = ext4_add_nondir(handle, dentry, &inode); if (handle) ext4_journal_stop(handle); - if (inode) - iput(inode); + iput(inode); goto out_free_encrypted_link; err_drop_inode: |