From 74be88755e411345d4db2a186438d02a44352aca Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 26 Aug 2010 00:54:39 +0200 Subject: [PATCH] --- yaml --- r: 218824 b: refs/heads/master c: beb37b85b0b727e68e16a39a1e5a2140f87fa201 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext3/ialloc.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 0bd9b832a9fa..a1ff760ba590 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 80f44b152c889e592616adf0d33b856107f4bace +refs/heads/master: beb37b85b0b727e68e16a39a1e5a2140f87fa201 diff --git a/trunk/fs/ext3/ialloc.c b/trunk/fs/ext3/ialloc.c index 4ab72db3559e..9724aef22460 100644 --- a/trunk/fs/ext3/ialloc.c +++ b/trunk/fs/ext3/ialloc.c @@ -570,9 +570,14 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode) ei->i_state_flags = 0; ext3_set_inode_state(inode, EXT3_STATE_NEW); - 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; + /* See comment in ext3_iget for explanation */ + if (ino >= EXT3_FIRST_INO(sb) + 1 && + EXT3_INODE_SIZE(sb) > EXT3_GOOD_OLD_INODE_SIZE) { + ei->i_extra_isize = + sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE; + } else { + ei->i_extra_isize = 0; + } ret = inode; dquot_initialize(inode);