diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-15 08:21:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-20 21:29:41 -0400 |
commit | 68ac1234fb949b66941d94dce4157742799fc581 (patch) | |
tree | 04059b7dbaed92d672b8ceef1fcf25c6185e06f8 /fs/nfsd/vfs.c | |
parent | 40ffe67d2e89c7a475421d007becc11a2f88ea3d (diff) |
switch touch_atime to struct path
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index edf6d3ed8777..e59f71d0cf73 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1541,30 +1541,31 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, | |||
1541 | __be32 | 1541 | __be32 |
1542 | nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) | 1542 | nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) |
1543 | { | 1543 | { |
1544 | struct dentry *dentry; | ||
1545 | struct inode *inode; | 1544 | struct inode *inode; |
1546 | mm_segment_t oldfs; | 1545 | mm_segment_t oldfs; |
1547 | __be32 err; | 1546 | __be32 err; |
1548 | int host_err; | 1547 | int host_err; |
1548 | struct path path; | ||
1549 | 1549 | ||
1550 | err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); | 1550 | err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); |
1551 | if (err) | 1551 | if (err) |
1552 | goto out; | 1552 | goto out; |
1553 | 1553 | ||
1554 | dentry = fhp->fh_dentry; | 1554 | path.mnt = fhp->fh_export->ex_path.mnt; |
1555 | inode = dentry->d_inode; | 1555 | path.dentry = fhp->fh_dentry; |
1556 | inode = path.dentry->d_inode; | ||
1556 | 1557 | ||
1557 | err = nfserr_inval; | 1558 | err = nfserr_inval; |
1558 | if (!inode->i_op->readlink) | 1559 | if (!inode->i_op->readlink) |
1559 | goto out; | 1560 | goto out; |
1560 | 1561 | ||
1561 | touch_atime(fhp->fh_export->ex_path.mnt, dentry); | 1562 | touch_atime(&path); |
1562 | /* N.B. Why does this call need a get_fs()?? | 1563 | /* N.B. Why does this call need a get_fs()?? |
1563 | * Remove the set_fs and watch the fireworks:-) --okir | 1564 | * Remove the set_fs and watch the fireworks:-) --okir |
1564 | */ | 1565 | */ |
1565 | 1566 | ||
1566 | oldfs = get_fs(); set_fs(KERNEL_DS); | 1567 | oldfs = get_fs(); set_fs(KERNEL_DS); |
1567 | host_err = inode->i_op->readlink(dentry, buf, *lenp); | 1568 | host_err = inode->i_op->readlink(path.dentry, buf, *lenp); |
1568 | set_fs(oldfs); | 1569 | set_fs(oldfs); |
1569 | 1570 | ||
1570 | if (host_err < 0) | 1571 | if (host_err < 0) |