/* Returns: 1 if alloc required, 0 if not, -ve on error  */
int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name)
/* Returns: 1 if alloc required, 0 if not, -ve on error  */
int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name)
{
	struct gfs2_dirent *dent;
	struct buffer_head *bh;
	dent = gfs2_dirent_search(inode, name, gfs2_dirent_find_space, &bh);
	if (!dent) {
		return 1;
	}
	if (IS_ERR(dent))
		return PTR_ERR(dent);
	brelse(bh);
	return 0;
}