提交 90a08c23 编写于 作者: Y yangerkun 提交者: Yang Yingliang

ext4: avoid recheck extent for EXT4_EX_FORCE_CACHE

hulk inclusion
category: bugfix
bugzilla: 109246
CVE: NA
---------------------------

Buffer with verified means that it has been checked before. No need
verify and call set_buffer_verified again.
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Reviewed-by: NJan Kara <jack@suse.cz>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 062c3bad
...@@ -589,13 +589,16 @@ __read_extent_tree_block(const char *function, unsigned int line, ...@@ -589,13 +589,16 @@ __read_extent_tree_block(const char *function, unsigned int line,
if (err < 0) if (err < 0)
goto errout; goto errout;
} }
if (buffer_verified(bh) && !(flags & EXT4_EX_FORCE_CACHE)) if (buffer_verified(bh)) {
return bh; if (!(flags & EXT4_EX_FORCE_CACHE))
err = __ext4_ext_check(function, line, inode, ext_block_hdr(bh), return bh;
depth, pblk, le32_to_cpu(idx->ei_block)); } else {
if (err) err = __ext4_ext_check(function, line, inode, ext_block_hdr(bh),
goto errout; depth, pblk, le32_to_cpu(idx->ei_block));
set_buffer_verified(bh); if (err)
goto errout;
set_buffer_verified(bh);
}
/* /*
* If this is a leaf block, cache all of its entries * If this is a leaf block, cache all of its entries
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册