From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>

current bk 2.6.0 corrupts my ext3 filesystems, usually in the RESYNC dir
during a bk pull.  Checking the recent changes I noticed that the one in
fs/ext3/namei.c misses an endian conversion.  The attached patch fixes that
and works fine for me since 2 days now on PPC.



 fs/ext3/namei.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/ext3/namei.c~htree-big-endian-fix fs/ext3/namei.c
--- 25/fs/ext3/namei.c~htree-big-endian-fix	2003-08-26 11:36:07.000000000 -0700
+++ 25-akpm/fs/ext3/namei.c	2003-08-26 11:36:07.000000000 -0700
@@ -1306,7 +1306,7 @@ static int make_indexed_dir(handle_t *ha
 
 	/* The 0th block becomes the root, move the dirents out */
 	fde = &root->dotdot;
-	de = (struct ext3_dir_entry_2 *)((char *)fde + fde->rec_len);
+	de = (struct ext3_dir_entry_2 *)((char *)fde + le16_to_cpu(fde->rec_len));
 	len = ((char *) root) + blocksize - (char *) de;
 	memcpy (data1, de, len);
 	de = (struct ext3_dir_entry_2 *) data1;

_