mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
ext4: Make ext4_ext_find_extent fills ext_path completely
When pos=0 or depth, the fields of ext4_ext_path is are not completely filled. This patch also removes some unnecessary code. Signed-off-by: Shen Feng <shen@cn.fujitsu.com> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
787e0981fa
commit
1973adcba5
1 changed files with 4 additions and 1 deletions
|
@ -524,6 +524,7 @@ ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block,
|
|||
alloc = 1;
|
||||
}
|
||||
path[0].p_hdr = eh;
|
||||
path[0].p_bh = NULL;
|
||||
|
||||
i = depth;
|
||||
/* walk through the tree */
|
||||
|
@ -552,12 +553,14 @@ ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block,
|
|||
}
|
||||
|
||||
path[ppos].p_depth = i;
|
||||
path[ppos].p_hdr = eh;
|
||||
path[ppos].p_ext = NULL;
|
||||
path[ppos].p_idx = NULL;
|
||||
|
||||
/* find extent */
|
||||
ext4_ext_binsearch(inode, path + ppos, block);
|
||||
/* if not an empty leaf */
|
||||
if (path[ppos].p_ext)
|
||||
path[ppos].p_block = ext_pblock(path[ppos].p_ext);
|
||||
|
||||
ext4_ext_show_path(inode, path);
|
||||
|
||||
|
|
Loading…
Reference in a new issue