return exp;
}
+svc_export *
+exp_get_by_name(svc_client *clp, struct vfsmount *mnt, struct dentry *dentry)
+{
+ int hash = EXPORT_HASH(mnt->mnt_sb->s_dev);
+ svc_export *exp;
+
+ if (!clp)
+ return NULL;
+
+ for (exp = clp->cl_export[hash]; exp; exp = exp->ex_next) {
+ if (exp->ex_dentry == dentry && exp->ex_mnt == mnt)
+ break;
+ }
+ return exp;
+}
+
/*
* Find the export entry for a given dentry. <gam3@acm.org>
*/
dentry = dp;
for ( ; exp2 == NULL && dp->d_parent != dp;
dp=dp->d_parent)
- exp2 = exp_get(exp->ex_client, dp->d_inode->i_dev, dp->d_inode->i_ino);
+ exp2 = exp_get_by_name(exp->ex_client, mnt, dp);
if (exp2==NULL) {
dput(dentry);
dentry = dget(dparent);
struct dentry *mounts = dget(dentry);
while (follow_down(&mnt,&mounts)&&d_mountpoint(mounts))
;
- exp2 = exp_get(rqstp->rq_client,
- mounts->d_inode->i_dev,
- mounts->d_inode->i_ino);
+ exp2 = exp_get_by_name(rqstp->rq_client, mnt, mounts);
if (exp2 && EX_CROSSMNT(exp2)) {
/* successfully crossed mount point */
exp = exp2;
struct svc_client * exp_getclient(struct sockaddr_in *sin);
void exp_putclient(struct svc_client *clp);
struct svc_export * exp_get(struct svc_client *clp, kdev_t dev, ino_t ino);
+struct svc_export * exp_get_by_name(struct svc_client *clp,
+ struct vfsmount *mnt,
+ struct dentry *dentry);
int exp_rootfh(struct svc_client *,
char *path, struct knfsd_fh *, int maxsize);
int nfserrno(int errno);