X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=fs%2Fnfsd%2Fvfs.c;h=296d671654d6a12fbb89567ea6b80cfd26a1829f;hb=71db34fc4330f7c784397acb9f1e6ee7f7b32eb2;hp=7423d712eb8c91f56dbf7c7c99d0bb8153fcb86c;hpb=797a9d797f8483bb67f265c761b76dcd5a077a23;p=karo-tx-linux.git diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 7423d712eb8c..296d671654d6 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -1549,30 +1549,31 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, __be32 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) { - struct dentry *dentry; struct inode *inode; mm_segment_t oldfs; __be32 err; int host_err; + struct path path; err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); if (err) goto out; - dentry = fhp->fh_dentry; - inode = dentry->d_inode; + path.mnt = fhp->fh_export->ex_path.mnt; + path.dentry = fhp->fh_dentry; + inode = path.dentry->d_inode; err = nfserr_inval; if (!inode->i_op->readlink) goto out; - touch_atime(fhp->fh_export->ex_path.mnt, dentry); + touch_atime(&path); /* N.B. Why does this call need a get_fs()?? * Remove the set_fs and watch the fireworks:-) --okir */ oldfs = get_fs(); set_fs(KERNEL_DS); - host_err = inode->i_op->readlink(dentry, buf, *lenp); + host_err = inode->i_op->readlink(path.dentry, buf, *lenp); set_fs(oldfs); if (host_err < 0)