===================================================================
--- linux-2.4.21-chaos.orig/fs/ext3/ialloc.c 2003-12-12 17:39:10.000000000 +0300
+++ linux-2.4.21-chaos/fs/ext3/ialloc.c 2003-12-12 17:39:55.000000000 +0300
-@@ -580,6 +580,12 @@
- insert_inode_hash(inode);
+@@ -580,6 +580,10 @@
inode->i_generation = sbi->s_next_generation++;
-+ if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) {
-+ EXT3_I(inode)->i_extra_isize = sizeof(__u16) /* i_extra_isize */
-+ + sizeof(__u16); /* i_pad1 */
-+ } else
-+ EXT3_I(inode)->i_extra_isize = 0;
-+
ei->i_state = EXT3_STATE_NEW;
- err = ext3_get_inode_loc_new(inode, &iloc, 1);
- if (err) goto fail;
++ ei->i_extra_isize =
++ (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
++ sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
++
+ err = ext3_get_inode_loc_new(inode, &iloc, 1);
+ if (err) goto fail;
+ BUFFER_TRACE(iloc->bh, "get_write_access");
Index: linux-2.4.21-chaos/fs/ext3/inode.c
===================================================================
--- linux-2.4.21-chaos.orig/fs/ext3/inode.c 2003-12-12 17:39:11.000000000 +0300
}
/*
-+ * ext3_xattr_ibode_get()
++ * ext3_xattr_ibody_get()
+ *
+ * routine looks for attribute in inode body and returns it's value and size
+ */
+ if ((sbi->s_inode_size < EXT3_GOOD_OLD_INODE_SIZE) ||
+ (sbi->s_inode_size & (sbi->s_inode_size - 1)) ||
+ (sbi->s_inode_size > blocksize)) {
-+ printk (KERN_ERR
++ printk (KERN_ERR
"EXT3-fs: unsupported inode size: %d\n",
sbi->s_inode_size);
goto failed_mount;