/* careful here - this function can get called recursively, so we need to be very careful about how much stack we use. uio is kmalloced for this reason...  */
STATIC void* xfs_vn_follow_link(struct dentry *dentry, struct nameidata *nd)
/* careful here - this function can get called recursively, so we need to be very careful about how much stack we use. uio is kmalloced for this reason...  */
STATIC void* xfs_vn_follow_link(struct dentry *dentry, struct nameidata *nd)
{
	char			*link;
	int			error = -ENOMEM;
	link = kmalloc(MAXPATHLEN+1, GFP_KERNEL);
	if (!link)
		goto out_err;
	error = -xfs_readlink(XFS_I(dentry->d_inode), link);
	if (unlikely(error))
		goto out_kfree;
	nd_set_link(nd, link);
	return NULL;
 out_kfree:
	kfree(link);
 out_err:
	nd_set_link(nd, ERR_PTR(error));
	return NULL;
}