Thread (6 messages) 6 messages, 3 authors, 2008-06-13

Re: [PATCH 2/2] ext4: Make ext4_ext_find_extent fills ext_path completely

From: Shen Feng <hidden>
Date: 2008-06-12 00:31:54


Aneesh Kumar K.V Wrote:
On Wed, Jun 11, 2008 at 01:55:10PM +0800, Shen Feng wrote:
quoted
When pos=0 or depth, the fields of ext4_ext_path is not
completely filled.
This patch also removes some unnecessary code.

Signed-off-by: Shen Feng <redacted>
---
 fs/ext4/extents.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index d4f76d7..ff609df 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -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;

We did a kzalloc before. So do we need this ?
If the path is not allocated by kzalloc, we need this.

quoted
 	i = depth;
 	/* walk through the tree */
@@ -552,12 +553,11 @@ ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block,
 	}

 	path[ppos].p_depth = i;
-	path[ppos].p_hdr = eh;

This is needed. Because we look at extent_header  in ext_binsearch.
This has been done in the last while loop.

quoted
-	path[ppos].p_ext = NULL;
 	path[ppos].p_idx = NULL;

 	/* find extent */
 	ext4_ext_binsearch(inode, path + ppos, block);
+	path[ppos].p_block = ext4_ext_pblock(path[ppos].p_ext);

 	ext4_ext_show_path(inode, path);
-aneesh
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help