Lines Matching refs:exp
25 * if not, require that we can walk up to exp->ex_dentry
30 struct svc_export *exp = expv;
35 if (exp->ex_flags & NFSEXP_NOSUBTREECHECK)
39 while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) {
51 if (tdentry != exp->ex_path.dentry)
53 rv = (tdentry == exp->ex_path.dentry);
102 struct svc_export *exp)
104 int flags = nfsexp_flags(rqstp, exp);
115 return nfserrno(nfsd_setuser(rqstp, exp));
119 struct dentry *dentry, struct svc_export *exp)
121 if (!(exp->ex_flags & NFSEXP_V4ROOT))
143 if (unlikely(dentry != exp->ex_path.dentry))
157 struct svc_export *exp;
196 exp = rqst_exp_find(rqstp, fh->fh_fsid_type, fh->fh_fsid);
209 exp = rqst_exp_find(rqstp, FSID_DEV, tfh);
213 if (IS_ERR(exp)) {
214 trace_nfsd_set_fh_dentry_badexport(rqstp, fhp, PTR_ERR(exp));
216 if (PTR_ERR(exp) == -ENOENT)
219 return nfserrno(PTR_ERR(exp));
222 if (exp->ex_flags & NFSEXP_NOSUBTREECHECK) {
243 error = nfsd_setuser_and_check_port(rqstp, exp);
269 dentry = dget(exp->ex_path.dentry);
271 dentry = exportfs_decode_fh(exp->ex_path.mnt, fid,
273 nfsd_acceptable, exp);
293 fhp->fh_export = exp;
296 exp_put(exp);
330 struct svc_export *exp;
342 exp = fhp->fh_export;
359 error = check_pseudo_root(rqstp, dentry, exp);
363 error = nfsd_setuser_and_check_port(rqstp, exp);
384 && exp->ex_path.dentry == dentry)
387 error = check_nfsd_access(exp, rqstp);
393 error = nfsd_permission(rqstp, exp, dentry, access);
415 static void _fh_update(struct svc_fh *fhp, struct svc_export *exp,
418 if (dentry != exp->ex_path.dentry) {
422 int subtreecheck = !(exp->ex_flags & NFSEXP_NOSUBTREECHECK);
436 struct svc_export *exp,
442 (exp->ex_flags & NFSEXP_NOSUBTREECHECK))
446 static bool is_root_export(struct svc_export *exp)
448 return exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root;
451 static struct super_block *exp_sb(struct svc_export *exp)
453 return exp->ex_path.dentry->d_sb;
456 static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp)
460 if (!old_valid_dev(exp_sb(exp)->s_dev))
465 return exp_sb(exp)->s_type->fs_flags & FS_REQUIRES_DEV;
467 return exp->ex_flags & NFSEXP_FSID;
470 if (!is_root_export(exp))
475 return exp->ex_uuid != NULL;
481 static void set_version_and_fsid_type(struct svc_fh *fhp, struct svc_export *exp, struct svc_fh *ref_fh)
487 if (ref_fh && ref_fh->fh_export == exp) {
509 if (!fsid_type_ok_for_exp(fsid_type, exp))
511 } else if (exp->ex_flags & NFSEXP_FSID) {
513 } else if (exp->ex_uuid) {
515 if (is_root_export(exp))
520 if (is_root_export(exp))
525 } else if (!old_valid_dev(exp_sb(exp)->s_dev))
536 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
548 dev_t ex_dev = exp_sb(exp)->s_dev;
550 dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %pd2, ino=%ld)\n",
552 (long) d_inode(exp->ex_path.dentry)->i_ino,
560 set_version_and_fsid_type(fhp, exp, ref_fh);
575 fhp->fh_export = exp_get(exp);
585 ino_t_to_u32(d_inode(exp->ex_path.dentry)->i_ino);
588 _fh_update_old(dentry, exp, &fhp->fh_handle);
597 d_inode(exp->ex_path.dentry)->i_ino,
598 exp->ex_fsid, exp->ex_uuid);
601 _fh_update(fhp, exp, dentry);
653 struct svc_export * exp = fhp->fh_export;
661 if (exp) {
662 exp_put(exp);