|
@@ -1541,30 +1541,31 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
|
__be32
|
|
__be32
|
|
nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
|
|
nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
|
|
{
|
|
{
|
|
- struct dentry *dentry;
|
|
|
|
struct inode *inode;
|
|
struct inode *inode;
|
|
mm_segment_t oldfs;
|
|
mm_segment_t oldfs;
|
|
__be32 err;
|
|
__be32 err;
|
|
int host_err;
|
|
int host_err;
|
|
|
|
+ struct path path;
|
|
|
|
|
|
err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP);
|
|
err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP);
|
|
if (err)
|
|
if (err)
|
|
goto out;
|
|
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;
|
|
err = nfserr_inval;
|
|
if (!inode->i_op->readlink)
|
|
if (!inode->i_op->readlink)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
- touch_atime(fhp->fh_export->ex_path.mnt, dentry);
|
|
|
|
|
|
+ touch_atime(&path);
|
|
/* N.B. Why does this call need a get_fs()??
|
|
/* N.B. Why does this call need a get_fs()??
|
|
* Remove the set_fs and watch the fireworks:-) --okir
|
|
* Remove the set_fs and watch the fireworks:-) --okir
|
|
*/
|
|
*/
|
|
|
|
|
|
oldfs = get_fs(); set_fs(KERNEL_DS);
|
|
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);
|
|
set_fs(oldfs);
|
|
|
|
|
|
if (host_err < 0)
|
|
if (host_err < 0)
|