diff options
author | Ye Bin <yebin10@huawei.com> | 2022-09-24 04:12:11 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-10-01 05:46:54 +0200 |
commit | 7ff5fddaddf2cc8d394f71e68648e9d8d7e41da8 (patch) | |
tree | eb31e16ebdab886acc23d3a3c4f075fdf7961af7 /fs/ext4/verity.c | |
parent | ext4: remove unnecessary drop path references in mext_check_coverage() (diff) | |
download | linux-7ff5fddaddf2cc8d394f71e68648e9d8d7e41da8.tar.xz linux-7ff5fddaddf2cc8d394f71e68648e9d8d7e41da8.zip |
ext4: factor out ext4_free_ext_path()
Factor out ext4_free_ext_path() to free extent path. As after previous patch
'ext4_ext_drop_refs()' is only used in 'extents.c', so make it static.
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220924021211.3831551-3-yebin10@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/verity.c')
-rw-r--r-- | fs/ext4/verity.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c index b051d19b5c8a..20cadfb740dc 100644 --- a/fs/ext4/verity.c +++ b/fs/ext4/verity.c @@ -298,16 +298,14 @@ static int ext4_get_verity_descriptor_location(struct inode *inode, last_extent = path[path->p_depth].p_ext; if (!last_extent) { EXT4_ERROR_INODE(inode, "verity file has no extents"); - ext4_ext_drop_refs(path); - kfree(path); + ext4_free_ext_path(path); return -EFSCORRUPTED; } end_lblk = le32_to_cpu(last_extent->ee_block) + ext4_ext_get_actual_len(last_extent); desc_size_pos = (u64)end_lblk << inode->i_blkbits; - ext4_ext_drop_refs(path); - kfree(path); + ext4_free_ext_path(path); if (desc_size_pos < sizeof(desc_size_disk)) goto bad; |