Revert "ext4: avoid use-after-free in ext4_ext_show_leaf()"
This reverts commit 2997f7a995
.
This commit is contained in:
parent
260c648056
commit
ac0ea5a530
1 changed files with 5 additions and 4 deletions
|
@ -3283,7 +3283,7 @@ out:
|
|||
}
|
||||
|
||||
/*
|
||||
* ext4_split_extent() splits an extent and mark extent which is covered
|
||||
* ext4_split_extents() splits an extent and mark extent which is covered
|
||||
* by @map as split_flags indicates
|
||||
*
|
||||
* It may result in splitting the extent into multiple extents (up to three)
|
||||
|
@ -3360,7 +3360,7 @@ static int ext4_split_extent(handle_t *handle,
|
|||
goto out;
|
||||
}
|
||||
|
||||
ext4_ext_show_leaf(inode, *ppath);
|
||||
ext4_ext_show_leaf(inode, path);
|
||||
out:
|
||||
return err ? err : allocated;
|
||||
}
|
||||
|
@ -3825,13 +3825,14 @@ ext4_ext_handle_unwritten_extents(handle_t *handle, struct inode *inode,
|
|||
struct ext4_ext_path **ppath, int flags,
|
||||
unsigned int allocated, ext4_fsblk_t newblock)
|
||||
{
|
||||
struct ext4_ext_path __maybe_unused *path = *ppath;
|
||||
int ret = 0;
|
||||
int err = 0;
|
||||
|
||||
ext_debug(inode, "logical block %llu, max_blocks %u, flags 0x%x, allocated %u\n",
|
||||
(unsigned long long)map->m_lblk, map->m_len, flags,
|
||||
allocated);
|
||||
ext4_ext_show_leaf(inode, *ppath);
|
||||
ext4_ext_show_leaf(inode, path);
|
||||
|
||||
/*
|
||||
* When writing into unwritten space, we should not fail to
|
||||
|
@ -3928,7 +3929,7 @@ out1:
|
|||
if (allocated > map->m_len)
|
||||
allocated = map->m_len;
|
||||
map->m_len = allocated;
|
||||
ext4_ext_show_leaf(inode, *ppath);
|
||||
ext4_ext_show_leaf(inode, path);
|
||||
out2:
|
||||
return err ? err : allocated;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue