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)) {
52 if (tdentry != exp->ex_path.dentry)
54 rv = (tdentry == exp->ex_path.dentry);
103 struct svc_export *exp)
105 int flags = nfsexp_flags(rqstp, exp);
116 return nfserrno(nfsd_setuser(rqstp, exp));
120 struct dentry *dentry, struct svc_export *exp)
122 if (!(exp->ex_flags & NFSEXP_V4ROOT))
144 if (unlikely(dentry != exp->ex_path.dentry))
158 struct svc_export *exp;
198 exp = rqst_exp_find(rqstp, fh->fh_fsid_type, fh->fh_fsid);
202 if (IS_ERR(exp)) {
203 trace_nfsd_set_fh_dentry_badexport(rqstp, fhp, PTR_ERR(exp));
205 if (PTR_ERR(exp) == -ENOENT)
208 return nfserrno(PTR_ERR(exp));
211 if (exp->ex_flags & NFSEXP_NOSUBTREECHECK) {
232 error = nfsd_setuser_and_check_port(rqstp, exp);
247 dentry = dget(exp->ex_path.dentry);
249 dentry = exportfs_decode_fh_raw(exp->ex_path.mnt, fid,
251 nfsd_acceptable, exp);
279 fhp->fh_export = exp;
296 exp_put(exp);
330 struct svc_export *exp = NULL;
340 exp = fhp->fh_export;
360 error = check_pseudo_root(rqstp, dentry, exp);
364 error = nfsd_setuser_and_check_port(rqstp, exp);
385 && exp->ex_path.dentry == dentry)
388 error = check_nfsd_access(exp, rqstp);
394 error = nfsd_permission(rqstp, exp, dentry, access);
398 nfsd_stats_fh_stale_inc(exp);
410 static void _fh_update(struct svc_fh *fhp, struct svc_export *exp,
413 if (dentry != exp->ex_path.dentry) {
417 int fh_flags = (exp->ex_flags & NFSEXP_NOSUBTREECHECK) ? 0 :
430 static bool is_root_export(struct svc_export *exp)
432 return exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root;
435 static struct super_block *exp_sb(struct svc_export *exp)
437 return exp->ex_path.dentry->d_sb;
440 static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp)
444 if (!old_valid_dev(exp_sb(exp)->s_dev))
449 return exp_sb(exp)->s_type->fs_flags & FS_REQUIRES_DEV;
451 return exp->ex_flags & NFSEXP_FSID;
454 if (!is_root_export(exp))
459 return exp->ex_uuid != NULL;
465 static void set_version_and_fsid_type(struct svc_fh *fhp, struct svc_export *exp, struct svc_fh *ref_fh)
471 if (ref_fh && ref_fh->fh_export == exp) {
493 if (!fsid_type_ok_for_exp(fsid_type, exp))
495 } else if (exp->ex_flags & NFSEXP_FSID) {
497 } else if (exp->ex_uuid) {
499 if (is_root_export(exp))
504 if (is_root_export(exp))
509 } else if (!old_valid_dev(exp_sb(exp)->s_dev))
520 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
529 dev_t ex_dev = exp_sb(exp)->s_dev;
531 dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %pd2, ino=%ld)\n",
533 (long) d_inode(exp->ex_path.dentry)->i_ino,
541 set_version_and_fsid_type(fhp, exp, ref_fh);
559 fhp->fh_export = exp_get(exp);
568 d_inode(exp->ex_path.dentry)->i_ino,
569 exp->ex_fsid, exp->ex_uuid);
572 _fh_update(fhp, exp, dentry);
700 struct svc_export * exp = fhp->fh_export;
707 if (exp) {
708 exp_put(exp);