ext4: no need to verify new add extent block
authoryangerkun <yangerkun@huawei.com>
Wed, 9 Jun 2021 07:55:45 +0000 (15:55 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 24 Jun 2021 14:29:13 +0000 (10:29 -0400)
ext4_ext_grow_indepth will add a new extent block which has init the
expected content. We can mark this buffer as verified so to stop a
useless check in __read_extent_tree_block.

Signed-off-by: yangerkun <yangerkun@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210609075545.1442160-1-yangerkun@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c

index 1293de5..92ad64b 100644 (file)
@@ -1309,6 +1309,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
        neh->eh_magic = EXT4_EXT_MAGIC;
        ext4_extent_block_csum_set(inode, neh);
        set_buffer_uptodate(bh);
+       set_buffer_verified(bh);
        unlock_buffer(bh);
 
        err = ext4_handle_dirty_metadata(handle, inode, bh);