hfs_cat_build_key((btree_key *)&HFS_I(inode)->cat_key, dir->i_ino, name); 
hfs_cat_build_key(sb, (btree_key *)&HFS_I(inode)->cat_key, dir->i_ino, name); 
struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, int mode){	struct super_block *sb = dir->i_sb;	struct inode *inode = new_inode(sb);	if (!inode)		return NULL;	init_MUTEX(&HFS_I(inode)->extents_lock);	INIT_LIST_HEAD(&HFS_I(inode)->open_dir_list);	hfs_cat_build_key((btree_key *)&HFS_I(inode)->cat_key, dir->i_ino, name);	inode->i_ino = HFS_SB(sb)->next_id++;	inode->i_mode = mode;	inode->i_uid = current->fsuid;	inode->i_gid = current->fsgid;	inode->i_nlink = 1;	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;	inode->i_blksize = HFS_SB(sb)->alloc_blksz;	HFS_I(inode)->flags = 0;	HFS_I(inode)->rsrc_inode = NULL;	HFS_I(inode)->fs_blocks = 0;	if (S_ISDIR(mode)) {		inode->i_size = 2;		HFS_SB(sb)->folder_count++;		if (dir->i_ino == HFS_ROOT_CNID)			HFS_SB(sb)->root_dirs++;		inode->i_op = &hfs_dir_inode_operations;		inode->i_fop = &hfs_dir_operations;		inode->i_mode |= S_IRWXUGO;		inode->i_mode &= ~HFS_SB(inode->i_sb)->s_dir_umask;	} else if (S_ISREG(mode)) {		HFS_I(inode)->clump_blocks = HFS_SB(sb)->clumpablks;		HFS_SB(sb)->file_count++;		if (dir->i_ino == HFS_ROOT_CNID)			HFS_SB(sb)->root_files++;		inode->i_op = &hfs_file_inode_operations;		inode->i_fop = &hfs_file_operations;		inode->i_mapping->a_ops = &hfs_aops;		inode->i_mode |= S_IRUGO|S_IXUGO;		if (mode & S_IWUSR)			inode->i_mode |= S_IWUGO;		inode->i_mode &= ~HFS_SB(inode->i_sb)->s_file_umask;		HFS_I(inode)->phys_size = 0;		HFS_I(inode)->alloc_blocks = 0;		HFS_I(inode)->first_blocks = 0;		HFS_I(inode)->cached_start = 0;		HFS_I(inode)->cached_blocks = 0;		memset(HFS_I(inode)->first_extents, 0, sizeof(hfs_extent_rec));		memset(HFS_I(inode)->cached_extents, 0, sizeof(hfs_extent_rec));	}	insert_inode_hash(inode);	mark_inode_dirty(inode);	set_bit(HFS_FLG_MDB_DIRTY, &HFS_SB(sb)->flags);	sb->s_dirt = 1;	return inode;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/328b9227865026268261a24a97a578907b280415/inode.c/buggy/fs/hfs/inode.c