On Jan 20, 2005 13:56 -0500, [EMAIL PROTECTED] wrote: > On Thu, 20 Jan 2005 19:22:25 +0100, Andreas Gruenbacher said: > > =================================================================== > > --- linux-2.6.11-latest.orig/fs/ext3/xattr.c > > +++ linux-2.6.11-latest/fs/ext3/xattr.c > > @@ -954,6 +954,13 @@ ext3_xattr_set_handle(handle_t *handle, > > + if (EXT3_I(inode)->i_state & EXT3_STATE_NEW) { > > + struct ext3_inode *raw_inode = ext3_raw_inode(&is.iloc); > > + memset(raw_inode, 0, EXT3_SB(inode->i_sb)->s_inode_size); > > + EXT3_I(inode)->i_state &= ~EXT3_STATE_NEW; > > + } > > Maybe I'm a total idiot, but I'm failing to see how adding *another* zero > operation (although quite likely needed at that point) is going to help the > fact that we zero something out after we've stored data we want to keep in it. > Is there a missing hunk that *removes* the too-late memset-to-zero in > ext3_do_update_inode?
Yes, as you can see above the EXT3_STATE_NEW flag is cleared so the later check in ext3_new_inode() will not again zero the inode Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
pgpyWiqZoKvZG.pgp
Description: PGP signature