mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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>
This commit is contained in:
@@ -1770,8 +1770,7 @@ static int ext4_fc_replay_add_range(struct super_block *sb,
|
||||
ret = ext4_ext_insert_extent(
|
||||
NULL, inode, &path, &newex, 0);
|
||||
up_write((&EXT4_I(inode)->i_data_sem));
|
||||
ext4_ext_drop_refs(path);
|
||||
kfree(path);
|
||||
ext4_free_ext_path(path);
|
||||
if (ret)
|
||||
goto out;
|
||||
goto next;
|
||||
@@ -1926,8 +1925,7 @@ static void ext4_fc_set_bitmaps_and_counters(struct super_block *sb)
|
||||
for (j = 0; j < path->p_depth; j++)
|
||||
ext4_mb_mark_bb(inode->i_sb,
|
||||
path[j].p_block, 1, 1);
|
||||
ext4_ext_drop_refs(path);
|
||||
kfree(path);
|
||||
ext4_free_ext_path(path);
|
||||
}
|
||||
cur += ret;
|
||||
ext4_mb_mark_bb(inode->i_sb, map.m_pblk,
|
||||
|
||||
Reference in New Issue
Block a user