if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) 
if (ei->i_extra_isize) 
static int ext3_do_update_inode(handle_t *handle, 				struct inode *inode, 				struct ext3_iloc *iloc){	struct ext3_inode *raw_inode = ext3_raw_inode(iloc);	struct ext3_inode_info *ei = EXT3_I(inode);	struct buffer_head *bh = iloc->bh;	int err = 0, rc, block;	/* For fields not not tracking in the in-memory inode,	 * initialise them to zero for new inodes. */	if (ei->i_state & EXT3_STATE_NEW)		memset(raw_inode, 0, EXT3_SB(inode->i_sb)->s_inode_size);	raw_inode->i_mode = cpu_to_le16(inode->i_mode);	if(!(test_opt(inode->i_sb, NO_UID32))) {		raw_inode->i_uid_low = cpu_to_le16(low_16_bits(inode->i_uid));		raw_inode->i_gid_low = cpu_to_le16(low_16_bits(inode->i_gid));/* * Fix up interoperability with old kernels. Otherwise, old inodes get * re-used with the upper 16 bits of the uid/gid intact */		if(!ei->i_dtime) {			raw_inode->i_uid_high =				cpu_to_le16(high_16_bits(inode->i_uid));			raw_inode->i_gid_high =				cpu_to_le16(high_16_bits(inode->i_gid));		} else {			raw_inode->i_uid_high = 0;			raw_inode->i_gid_high = 0;		}	} else {		raw_inode->i_uid_low =			cpu_to_le16(fs_high2lowuid(inode->i_uid));		raw_inode->i_gid_low =			cpu_to_le16(fs_high2lowgid(inode->i_gid));		raw_inode->i_uid_high = 0;		raw_inode->i_gid_high = 0;	}	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);	raw_inode->i_size = cpu_to_le32(ei->i_disksize);	raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);	raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);	raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);	raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);	raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);	raw_inode->i_flags = cpu_to_le32(ei->i_flags);#ifdef EXT3_FRAGMENTS	raw_inode->i_faddr = cpu_to_le32(ei->i_faddr);	raw_inode->i_frag = ei->i_frag_no;	raw_inode->i_fsize = ei->i_frag_size;#endif	raw_inode->i_file_acl = cpu_to_le32(ei->i_file_acl);	if (!S_ISREG(inode->i_mode)) {		raw_inode->i_dir_acl = cpu_to_le32(ei->i_dir_acl);	} else {		raw_inode->i_size_high =			cpu_to_le32(ei->i_disksize >> 32);		if (ei->i_disksize > 0x7fffffffULL) {			struct super_block *sb = inode->i_sb;			if (!EXT3_HAS_RO_COMPAT_FEATURE(sb,					EXT3_FEATURE_RO_COMPAT_LARGE_FILE) ||			    EXT3_SB(sb)->s_es->s_rev_level ==					cpu_to_le32(EXT3_GOOD_OLD_REV)) {			       /* If this is the first large file				* created, add a flag to the superblock.				*/				err = ext3_journal_get_write_access(handle,						EXT3_SB(sb)->s_sbh);				if (err)					goto out_brelse;				ext3_update_dynamic_rev(sb);				EXT3_SET_RO_COMPAT_FEATURE(sb,					EXT3_FEATURE_RO_COMPAT_LARGE_FILE);				sb->s_dirt = 1;				handle->h_sync = 1;				err = ext3_journal_dirty_metadata(handle,						EXT3_SB(sb)->s_sbh);			}		}	}	raw_inode->i_generation = cpu_to_le32(inode->i_generation);	if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) {		if (old_valid_dev(inode->i_rdev)) {			raw_inode->i_block[0] =				cpu_to_le32(old_encode_dev(inode->i_rdev));			raw_inode->i_block[1] = 0;		} else {			raw_inode->i_block[0] = 0;			raw_inode->i_block[1] =				cpu_to_le32(new_encode_dev(inode->i_rdev));			raw_inode->i_block[2] = 0;		}	} else for (block = 0; block < EXT3_N_BLOCKS; block++)		raw_inode->i_block[block] = ei->i_data[block];	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)		raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);	BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");	rc = ext3_journal_dirty_metadata(handle, bh);	if (!err)		err = rc;	ei->i_state &= ~EXT3_STATE_NEW;out_brelse:	brelse (bh);	ext3_std_error(inode->i_sb, err);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ff87b37da912d6aeab6c20c58f51b34d3e37f111/inode.c/buggy/fs/ext3/inode.c