vserver 1.9.5.x5
[linux-2.6.git] / fs / nfsd / export.c
index fabf605..96c0ea8 100644 (file)
@@ -294,17 +294,17 @@ void svc_export_request(struct cache_detail *cd,
 
        qword_add(bpp, blen, exp->ex_client->name);
        pth = d_path(exp->ex_dentry, exp->ex_mnt, *bpp, *blen);
+       if (IS_ERR(pth)) {
+               /* is this correct? */
+               (*bpp)[0] = '\n';
+               return;
+       }
        qword_add(bpp, blen, pth);
        (*bpp)[-1] = '\n';
 }
 
 static struct svc_export *svc_export_lookup(struct svc_export *, int);
 
-extern struct dentry *
-find_exported_dentry(struct super_block *sb, void *obj, void *parent,
-                    int (*acceptable)(void *context, struct dentry *de),
-                    void *context);
-
 static int check_export(struct inode *inode, int flags)
 {
 
@@ -899,7 +899,7 @@ exp_rootfh(svc_client *clp, char *path, struct knfsd_fh *f, int maxsize)
         * fh must be initialized before calling fh_compose
         */
        fh_init(&fh, maxsize);
-       if (fh_compose(&fh, exp, dget(nd.dentry), NULL))
+       if (fh_compose(&fh, exp, nd.dentry, NULL))
                err = -EINVAL;
        else
                err = 0;
@@ -932,7 +932,6 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp,
        if (!fsid_key || IS_ERR(fsid_key))
                return nfserr_perm;
 
-       dget(fsid_key->ek_export->ex_dentry);
        rv = fh_compose(fhp, fsid_key->ek_export, 
                          fsid_key->ek_export->ex_dentry, NULL);
        expkey_put(&fsid_key->h, &svc_expkey_cache);