OSDN Git Service

ext4: remove an unnecessary if statement in __ext4_get_inode_loc()
authorZhang Yi <yi.zhang@huawei.com>
Thu, 26 Aug 2021 13:04:08 +0000 (21:04 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 31 Aug 2021 03:36:51 +0000 (23:36 -0400)
commit8e33fadf945a918c50d92fab6a769661df484156
tree99a040598cd9e5b567257daf16654a08cf971ac7
parent0904c9ae3465c7acc066a564a76b75c0af83e6c7
ext4: remove an unnecessary if statement in __ext4_get_inode_loc()

The "if (!buffer_uptodate(bh))" hunk covered almost the whole code after
getting buffer in __ext4_get_inode_loc() which seems unnecessary, remove
it and switch to check ext4_buffer_uptodate(), it simplify code and make
it more readable.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210826130412.3921207-3-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inode.c