/* Find the export entry for a given dentry.  */
static struct svc_export* exp_parent(svc_client *clp, struct path *path)
/* Find the export entry for a given dentry.  */
static struct svc_export* exp_parent(svc_client *clp, struct path *path)
{
	struct dentry *saved = dget(path->dentry);
	svc_export *exp = exp_get_by_name(clp, path, NULL);
	while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) {
		struct dentry *parent = dget_parent(path->dentry);
		dput(path->dentry);
		path->dentry = parent;
		exp = exp_get_by_name(clp, path, NULL);
	}
	dput(path->dentry);
	path->dentry = saved;
	return exp;
}