aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorJan Blunck <jblunck@suse.de>2008-02-14 22:38:39 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-15 00:17:08 -0500
commit5477549161480432d053565d2720f08626baf9e3 (patch)
tree0993666627a6f53f5c7cc9277a329760ccc1002d /fs/nfsd/vfs.c
parent448678a0f3cdd0157f00e98bd337e32030273637 (diff)
Use struct path in struct svc_export
I'm embedding struct path into struct svc_export. [akpm@linux-foundation.org: coding-style fixes] [ezk@cs.sunysb.edu: NFSD: fix wrong mnt_writer count in rename] Signed-off-by: Jan Blunck <jblunck@suse.de> Acked-by: J. Bruce Fields <bfields@citi.umich.edu> Acked-by: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index cc75e4fcd02b..46f59d5365a0 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -101,7 +101,7 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
101{ 101{
102 struct svc_export *exp = *expp, *exp2 = NULL; 102 struct svc_export *exp = *expp, *exp2 = NULL;
103 struct dentry *dentry = *dpp; 103 struct dentry *dentry = *dpp;
104 struct vfsmount *mnt = mntget(exp->ex_mnt); 104 struct vfsmount *mnt = mntget(exp->ex_path.mnt);
105 struct dentry *mounts = dget(dentry); 105 struct dentry *mounts = dget(dentry);
106 int err = 0; 106 int err = 0;
107 107
@@ -156,15 +156,15 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
156 if (isdotent(name, len)) { 156 if (isdotent(name, len)) {
157 if (len==1) 157 if (len==1)
158 dentry = dget(dparent); 158 dentry = dget(dparent);
159 else if (dparent != exp->ex_dentry) { 159 else if (dparent != exp->ex_path.dentry)
160 dentry = dget_parent(dparent); 160 dentry = dget_parent(dparent);
161 } else if (!EX_NOHIDE(exp)) 161 else if (!EX_NOHIDE(exp))
162 dentry = dget(dparent); /* .. == . just like at / */ 162 dentry = dget(dparent); /* .. == . just like at / */
163 else { 163 else {
164 /* checking mountpoint crossing is very different when stepping up */ 164 /* checking mountpoint crossing is very different when stepping up */
165 struct svc_export *exp2 = NULL; 165 struct svc_export *exp2 = NULL;
166 struct dentry *dp; 166 struct dentry *dp;
167 struct vfsmount *mnt = mntget(exp->ex_mnt); 167 struct vfsmount *mnt = mntget(exp->ex_path.mnt);
168 dentry = dget(dparent); 168 dentry = dget(dparent);
169 while(dentry == mnt->mnt_root && follow_up(&mnt, &dentry)) 169 while(dentry == mnt->mnt_root && follow_up(&mnt, &dentry))
170 ; 170 ;
@@ -721,7 +721,8 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
721 721
722 DQUOT_INIT(inode); 722 DQUOT_INIT(inode);
723 } 723 }
724 *filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_mnt), flags); 724 *filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt),
725 flags);
725 if (IS_ERR(*filp)) 726 if (IS_ERR(*filp))
726 host_err = PTR_ERR(*filp); 727 host_err = PTR_ERR(*filp);
727out_nfserr: 728out_nfserr:
@@ -1462,7 +1463,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
1462 if (!inode->i_op || !inode->i_op->readlink) 1463 if (!inode->i_op || !inode->i_op->readlink)
1463 goto out; 1464 goto out;
1464 1465
1465 touch_atime(fhp->fh_export->ex_mnt, dentry); 1466 touch_atime(fhp->fh_export->ex_path.mnt, dentry);
1466 /* N.B. Why does this call need a get_fs()?? 1467 /* N.B. Why does this call need a get_fs()??
1467 * Remove the set_fs and watch the fireworks:-) --okir 1468 * Remove the set_fs and watch the fireworks:-) --okir
1468 */ 1469 */