diff options
author | Jan Blunck <jblunck@suse.de> | 2008-02-14 22:38:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:17:08 -0500 |
commit | 5477549161480432d053565d2720f08626baf9e3 (patch) | |
tree | 0993666627a6f53f5c7cc9277a329760ccc1002d /fs/nfsd/nfsfh.c | |
parent | 448678a0f3cdd0157f00e98bd337e32030273637 (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/nfsfh.c')
-rw-r--r-- | fs/nfsd/nfsfh.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 8fbd2dc08a92..0130b345234d 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -47,7 +47,7 @@ static int nfsd_acceptable(void *expv, struct dentry *dentry) | |||
47 | return 1; | 47 | return 1; |
48 | 48 | ||
49 | tdentry = dget(dentry); | 49 | tdentry = dget(dentry); |
50 | while (tdentry != exp->ex_dentry && ! IS_ROOT(tdentry)) { | 50 | while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) { |
51 | /* make sure parents give x permission to user */ | 51 | /* make sure parents give x permission to user */ |
52 | int err; | 52 | int err; |
53 | parent = dget_parent(tdentry); | 53 | parent = dget_parent(tdentry); |
@@ -59,9 +59,9 @@ static int nfsd_acceptable(void *expv, struct dentry *dentry) | |||
59 | dput(tdentry); | 59 | dput(tdentry); |
60 | tdentry = parent; | 60 | tdentry = parent; |
61 | } | 61 | } |
62 | if (tdentry != exp->ex_dentry) | 62 | if (tdentry != exp->ex_path.dentry) |
63 | dprintk("nfsd_acceptable failed at %p %s\n", tdentry, tdentry->d_name.name); | 63 | dprintk("nfsd_acceptable failed at %p %s\n", tdentry, tdentry->d_name.name); |
64 | rv = (tdentry == exp->ex_dentry); | 64 | rv = (tdentry == exp->ex_path.dentry); |
65 | dput(tdentry); | 65 | dput(tdentry); |
66 | return rv; | 66 | return rv; |
67 | } | 67 | } |
@@ -209,9 +209,9 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
209 | fileid_type = fh->fh_fileid_type; | 209 | fileid_type = fh->fh_fileid_type; |
210 | 210 | ||
211 | if (fileid_type == FILEID_ROOT) | 211 | if (fileid_type == FILEID_ROOT) |
212 | dentry = dget(exp->ex_dentry); | 212 | dentry = dget(exp->ex_path.dentry); |
213 | else { | 213 | else { |
214 | dentry = exportfs_decode_fh(exp->ex_mnt, fid, | 214 | dentry = exportfs_decode_fh(exp->ex_path.mnt, fid, |
215 | data_left, fileid_type, | 215 | data_left, fileid_type, |
216 | nfsd_acceptable, exp); | 216 | nfsd_acceptable, exp); |
217 | } | 217 | } |
@@ -299,7 +299,7 @@ out: | |||
299 | static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, | 299 | static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, |
300 | struct dentry *dentry) | 300 | struct dentry *dentry) |
301 | { | 301 | { |
302 | if (dentry != exp->ex_dentry) { | 302 | if (dentry != exp->ex_path.dentry) { |
303 | struct fid *fid = (struct fid *) | 303 | struct fid *fid = (struct fid *) |
304 | (fhp->fh_handle.fh_auth + fhp->fh_handle.fh_size/4 - 1); | 304 | (fhp->fh_handle.fh_auth + fhp->fh_handle.fh_size/4 - 1); |
305 | int maxsize = (fhp->fh_maxsize - fhp->fh_handle.fh_size)/4; | 305 | int maxsize = (fhp->fh_maxsize - fhp->fh_handle.fh_size)/4; |
@@ -344,12 +344,12 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, | |||
344 | struct inode * inode = dentry->d_inode; | 344 | struct inode * inode = dentry->d_inode; |
345 | struct dentry *parent = dentry->d_parent; | 345 | struct dentry *parent = dentry->d_parent; |
346 | __u32 *datap; | 346 | __u32 *datap; |
347 | dev_t ex_dev = exp->ex_dentry->d_inode->i_sb->s_dev; | 347 | dev_t ex_dev = exp->ex_path.dentry->d_inode->i_sb->s_dev; |
348 | int root_export = (exp->ex_dentry == exp->ex_dentry->d_sb->s_root); | 348 | int root_export = (exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root); |
349 | 349 | ||
350 | dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %s/%s, ino=%ld)\n", | 350 | dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %s/%s, ino=%ld)\n", |
351 | MAJOR(ex_dev), MINOR(ex_dev), | 351 | MAJOR(ex_dev), MINOR(ex_dev), |
352 | (long) exp->ex_dentry->d_inode->i_ino, | 352 | (long) exp->ex_path.dentry->d_inode->i_ino, |
353 | parent->d_name.name, dentry->d_name.name, | 353 | parent->d_name.name, dentry->d_name.name, |
354 | (inode ? inode->i_ino : 0)); | 354 | (inode ? inode->i_ino : 0)); |
355 | 355 | ||
@@ -391,7 +391,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, | |||
391 | /* FALL THROUGH */ | 391 | /* FALL THROUGH */ |
392 | case FSID_MAJOR_MINOR: | 392 | case FSID_MAJOR_MINOR: |
393 | case FSID_ENCODE_DEV: | 393 | case FSID_ENCODE_DEV: |
394 | if (!(exp->ex_dentry->d_inode->i_sb->s_type->fs_flags | 394 | if (!(exp->ex_path.dentry->d_inode->i_sb->s_type->fs_flags |
395 | & FS_REQUIRES_DEV)) | 395 | & FS_REQUIRES_DEV)) |
396 | goto retry; | 396 | goto retry; |
397 | break; | 397 | break; |
@@ -454,7 +454,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, | |||
454 | fhp->fh_handle.ofh_dev = old_encode_dev(ex_dev); | 454 | fhp->fh_handle.ofh_dev = old_encode_dev(ex_dev); |
455 | fhp->fh_handle.ofh_xdev = fhp->fh_handle.ofh_dev; | 455 | fhp->fh_handle.ofh_xdev = fhp->fh_handle.ofh_dev; |
456 | fhp->fh_handle.ofh_xino = | 456 | fhp->fh_handle.ofh_xino = |
457 | ino_t_to_u32(exp->ex_dentry->d_inode->i_ino); | 457 | ino_t_to_u32(exp->ex_path.dentry->d_inode->i_ino); |
458 | fhp->fh_handle.ofh_dirino = ino_t_to_u32(parent_ino(dentry)); | 458 | fhp->fh_handle.ofh_dirino = ino_t_to_u32(parent_ino(dentry)); |
459 | if (inode) | 459 | if (inode) |
460 | _fh_update_old(dentry, exp, &fhp->fh_handle); | 460 | _fh_update_old(dentry, exp, &fhp->fh_handle); |
@@ -465,7 +465,7 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, | |||
465 | datap = fhp->fh_handle.fh_auth+0; | 465 | datap = fhp->fh_handle.fh_auth+0; |
466 | fhp->fh_handle.fh_fsid_type = fsid_type; | 466 | fhp->fh_handle.fh_fsid_type = fsid_type; |
467 | mk_fsid(fsid_type, datap, ex_dev, | 467 | mk_fsid(fsid_type, datap, ex_dev, |
468 | exp->ex_dentry->d_inode->i_ino, | 468 | exp->ex_path.dentry->d_inode->i_ino, |
469 | exp->ex_fsid, exp->ex_uuid); | 469 | exp->ex_fsid, exp->ex_uuid); |
470 | 470 | ||
471 | len = key_len(fsid_type); | 471 | len = key_len(fsid_type); |
@@ -571,7 +571,7 @@ enum fsid_source fsid_source(struct svc_fh *fhp) | |||
571 | case FSID_DEV: | 571 | case FSID_DEV: |
572 | case FSID_ENCODE_DEV: | 572 | case FSID_ENCODE_DEV: |
573 | case FSID_MAJOR_MINOR: | 573 | case FSID_MAJOR_MINOR: |
574 | if (fhp->fh_export->ex_dentry->d_inode->i_sb->s_type->fs_flags | 574 | if (fhp->fh_export->ex_path.dentry->d_inode->i_sb->s_type->fs_flags |
575 | & FS_REQUIRES_DEV) | 575 | & FS_REQUIRES_DEV) |
576 | return FSIDSOURCE_DEV; | 576 | return FSIDSOURCE_DEV; |
577 | break; | 577 | break; |