/* nilfs_ifile_new - create inode file @sbi: nilfs_sb_info struct @inode_size: size of an inode  */
struct inode* nilfs_ifile_new(struct nilfs_sb_info *sbi, size_t inode_size)
/* nilfs_ifile_new - create inode file @sbi: nilfs_sb_info struct @inode_size: size of an inode  */
struct inode* nilfs_ifile_new(struct nilfs_sb_info *sbi, size_t inode_size)
{
	struct inode *ifile;
	int err;
	ifile = nilfs_mdt_new(sbi->s_nilfs, sbi->s_super, NILFS_IFILE_INO,
			      sizeof(struct nilfs_ifile_info));
	if (ifile) {
		err = nilfs_palloc_init_blockgroup(ifile, inode_size);
		if (unlikely(err)) {
			nilfs_mdt_destroy(ifile);
			return NULL;
		}
		nilfs_palloc_setup_cache(ifile,
					 &NILFS_IFILE_I(ifile)->palloc_cache);
	}
	return ifile;
}