Fix random whitespace issues and other checkpatch flameage. Also made
[ext4-patch-queue.git] / ext4-make-ext4_ext_find_extent-fills-ext_path-completely.patch
blob170992153db02167fa974e9028a61f4684812c93
1 ext4: Make ext4_ext_find_extent fills ext_path completely
3 From: Shen Feng <shen@cn.fujitsu.com>
5 When pos=0 or depth, the fields of ext4_ext_path is are not
6 completely filled. This patch also removes some unnecessary code.
8 Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
9 Signed-off-by: Mingming Cao <cmm@us.ibm.com>
10 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
11 ---
12 fs/ext4/extents.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
15 Index: linux-2.6.26-rc6/fs/ext4/extents.c
16 ===================================================================
17 --- linux-2.6.26-rc6.orig/fs/ext4/extents.c 2008-06-17 10:43:29.000000000 -0700
18 +++ linux-2.6.26-rc6/fs/ext4/extents.c 2008-06-17 10:43:29.000000000 -0700
19 @@ -524,6 +524,7 @@ ext4_ext_find_extent(struct inode *inode
20 alloc = 1;
22 path[0].p_hdr = eh;
23 + path[0].p_bh = NULL;
25 i = depth;
26 /* walk through the tree */
27 @@ -552,12 +553,14 @@ ext4_ext_find_extent(struct inode *inode
30 path[ppos].p_depth = i;
31 - path[ppos].p_hdr = eh;
32 path[ppos].p_ext = NULL;
33 path[ppos].p_idx = NULL;
35 /* find extent */
36 ext4_ext_binsearch(inode, path + ppos, block);
37 + /* if not an empty leaf */
38 + if (path[ppos].p_ext)
39 + path[ppos].p_block = ext_pblock(path[ppos].p_ext);
41 ext4_ext_show_path(inode, path);