X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfsd%2Fexport.c;h=96c0ea8f60ceab6ca3380713c3c17030e459ee70;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=fabf60532101a5100b73a1faa9cb8ae4575c3631;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index fabf60532..96c0ea8f6 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -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);