aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/fast_commit.c
diff options
context:
space:
mode:
authorLv Ruyi <[email protected]>2022-04-11 03:23:37 +0000
committerTheodore Ts'o <[email protected]>2022-05-13 20:27:24 +0000
commit784a09951c1d8383498c0df091a37db612bebfc7 (patch)
tree08d4a3e48f2eb2bc7130b18c3f76ccdb5b926c2e /fs/ext4/fast_commit.c
parentext4: remove unnecessary code in __mb_check_buddy (diff)
downloadkernel-784a09951c1d8383498c0df091a37db612bebfc7.tar.gz
kernel-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 <[email protected]> Signed-off-by: Lv Ruyi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
-rw-r--r--fs/ext4/fast_commit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index 7b0b57be8615..795a60ad1897 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -1659,8 +1659,7 @@ static int ext4_fc_replay_create(struct super_block *sb, struct ext4_fc_tl *tl,
set_nlink(inode, 1);
ext4_mark_inode_dirty(NULL, inode);
out:
- if (inode)
- iput(inode);
+ iput(inode);
return ret;
}