]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7cb159d71ace4c474ca4d9fcd7a87972a44ac2f0
tree99a040598cd9e5b567257daf16654a08cf971ac7
parent35ca14b94ce67b5ae178b28df3f4e2127dab5b51
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