struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(sb);  if (sbinfo->free_inodes >= 0) { spin_lock(&sbinfo->stat_lock); if (!sbinfo->free_inodes) { spin_unlock(&sbinfo->stat_lock); return NULL; } sbinfo->free_inodes--; spin_unlock(&sbinfo->stat_lock); } 
static struct inode *hugetlbfs_get_inode(struct super_block *sb, uid_t uid, 					gid_t gid, int mode, dev_t dev){	struct inode *inode;	struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(sb);	if (sbinfo->free_inodes >= 0) {		spin_lock(&sbinfo->stat_lock);		if (!sbinfo->free_inodes) {			spin_unlock(&sbinfo->stat_lock);			return NULL;		}		sbinfo->free_inodes--;		spin_unlock(&sbinfo->stat_lock);	}	inode = new_inode(sb);	if (inode) {		struct hugetlbfs_inode_info *info;		inode->i_mode = mode;		inode->i_uid = uid;		inode->i_gid = gid;		inode->i_blksize = HPAGE_SIZE;		inode->i_blocks = 0;		inode->i_mapping->a_ops = &hugetlbfs_aops;		inode->i_mapping->backing_dev_info =&hugetlbfs_backing_dev_info;		inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;		info = HUGETLBFS_I(inode);		mpol_shared_policy_init(&info->policy);		switch (mode & S_IFMT) {		default:			init_special_inode(inode, mode, dev);			break;		case S_IFREG:			inode->i_op = &hugetlbfs_inode_operations;			inode->i_fop = &hugetlbfs_file_operations;			break;		case S_IFDIR:			inode->i_op = &hugetlbfs_dir_inode_operations;			inode->i_fop = &simple_dir_operations;			/* directory inodes start off with i_nlink == 2 (for "." entry) */			inode->i_nlink++;			break;		case S_IFLNK:			inode->i_op = &page_symlink_inode_operations;			break;		}	}	return inode;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/96527980d4cb8f65fe49efdbc4ab92c0837d42f6/inode.c/buggy/fs/hugetlbfs/inode.c