ext4: use IS_ERR instead of IS_ERR_OR_NULL and set inode null when IS_ERR
authorYi Li <yili@winhong.com>
Wed, 30 Dec 2020 03:38:27 +0000 (11:38 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 15 Jan 2021 19:39:14 +0000 (14:39 -0500)
commit23dd561ad9eae02b4d51bb502fe4e1a0666e9567
tree5bf0267faaa947c6c24f7ef266801a340e318b20
parent5a3b590d4b2db187faa6f06adc9a53d6199fb1f9
ext4: use IS_ERR instead of IS_ERR_OR_NULL and set inode null when IS_ERR

1: ext4_iget/ext4_find_extent never returns NULL, use IS_ERR
instead of IS_ERR_OR_NULL to fix this.

2: ext4_fc_replay_inode should set the inode to NULL when IS_ERR.
and go to call iput properly.

Fixes: 8016e29f4362 ("ext4: fast commit recovery path")
Signed-off-by: Yi Li <yili@winhong.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20201230033827.3996064-1-yili@winhong.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/fast_commit.c