Lines Matching refs:exp

30 	struct svc_export *exp = expv;  in nfsd_acceptable()  local
35 if (exp->ex_flags & NFSEXP_NOSUBTREECHECK) in nfsd_acceptable()
39 while (tdentry != exp->ex_path.dentry && !IS_ROOT(tdentry)) { in nfsd_acceptable()
52 if (tdentry != exp->ex_path.dentry) in nfsd_acceptable()
54 rv = (tdentry == exp->ex_path.dentry); in nfsd_acceptable()
92 struct svc_export *exp) in nfsd_originating_port_ok() argument
94 if (nfsexp_flags(cred, exp) & NFSEXP_INSECURE_PORT) in nfsd_originating_port_ok()
104 struct svc_export *exp) in nfsd_setuser_and_check_port() argument
107 if (rqstp && !nfsd_originating_port_ok(rqstp, cred, exp)) { in nfsd_setuser_and_check_port()
115 return nfserrno(nfsd_setuser(cred, exp)); in nfsd_setuser_and_check_port()
119 struct svc_export *exp) in check_pseudo_root() argument
121 if (!(exp->ex_flags & NFSEXP_V4ROOT)) in check_pseudo_root()
135 if (unlikely(dentry != exp->ex_path.dentry)) in check_pseudo_root()
153 struct svc_export *exp; in nfsd_set_fh_dentry() local
191 exp = rqst_exp_find(rqstp ? &rqstp->rq_chandle : NULL, in nfsd_set_fh_dentry()
197 if (IS_ERR(exp)) { in nfsd_set_fh_dentry()
198 trace_nfsd_set_fh_dentry_badexport(rqstp, fhp, PTR_ERR(exp)); in nfsd_set_fh_dentry()
200 if (PTR_ERR(exp) == -ENOENT) in nfsd_set_fh_dentry()
203 return nfserrno(PTR_ERR(exp)); in nfsd_set_fh_dentry()
206 if (exp->ex_flags & NFSEXP_NOSUBTREECHECK) { in nfsd_set_fh_dentry()
227 error = nfsd_setuser_and_check_port(rqstp, cred, exp); in nfsd_set_fh_dentry()
240 dentry = dget(exp->ex_path.dentry); in nfsd_set_fh_dentry()
242 dentry = exportfs_decode_fh_raw(exp->ex_path.mnt, fid, in nfsd_set_fh_dentry()
244 nfsd_acceptable, exp); in nfsd_set_fh_dentry()
272 fhp->fh_export = exp; in nfsd_set_fh_dentry()
284 if (exp->ex_flags & NFSEXP_V4ROOT) in nfsd_set_fh_dentry()
289 if (EX_WGATHER(exp)) in nfsd_set_fh_dentry()
291 if (exp->ex_flags & NFSEXP_V4ROOT) in nfsd_set_fh_dentry()
297 exp_put(exp); in nfsd_set_fh_dentry()
322 struct svc_export *exp = NULL; in __fh_verify() local
333 exp = fhp->fh_export; in __fh_verify()
353 error = check_pseudo_root(dentry, exp); in __fh_verify()
357 error = nfsd_setuser_and_check_port(rqstp, cred, exp); in __fh_verify()
378 && exp->ex_path.dentry == dentry) in __fh_verify()
381 error = check_nfsd_access(exp, rqstp); in __fh_verify()
387 error = nfsd_permission(cred, exp, dentry, access); in __fh_verify()
391 nfsd_stats_fh_stale_inc(nn, exp); in __fh_verify()
460 static void _fh_update(struct svc_fh *fhp, struct svc_export *exp, in _fh_update() argument
463 if (dentry != exp->ex_path.dentry) { in _fh_update()
467 int fh_flags = (exp->ex_flags & NFSEXP_NOSUBTREECHECK) ? 0 : in _fh_update()
480 static bool is_root_export(struct svc_export *exp) in is_root_export() argument
482 return exp->ex_path.dentry == exp->ex_path.dentry->d_sb->s_root; in is_root_export()
485 static struct super_block *exp_sb(struct svc_export *exp) in exp_sb() argument
487 return exp->ex_path.dentry->d_sb; in exp_sb()
490 static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp) in fsid_type_ok_for_exp() argument
494 if (!old_valid_dev(exp_sb(exp)->s_dev)) in fsid_type_ok_for_exp()
499 return exp_sb(exp)->s_type->fs_flags & FS_REQUIRES_DEV; in fsid_type_ok_for_exp()
501 return exp->ex_flags & NFSEXP_FSID; in fsid_type_ok_for_exp()
504 if (!is_root_export(exp)) in fsid_type_ok_for_exp()
509 return exp->ex_uuid != NULL; in fsid_type_ok_for_exp()
515 static void set_version_and_fsid_type(struct svc_fh *fhp, struct svc_export *exp, struct svc_fh *re… in set_version_and_fsid_type() argument
521 if (ref_fh && ref_fh->fh_export == exp) { in set_version_and_fsid_type()
543 if (!fsid_type_ok_for_exp(fsid_type, exp)) in set_version_and_fsid_type()
545 } else if (exp->ex_flags & NFSEXP_FSID) { in set_version_and_fsid_type()
547 } else if (exp->ex_uuid) { in set_version_and_fsid_type()
549 if (is_root_export(exp)) in set_version_and_fsid_type()
554 if (is_root_export(exp)) in set_version_and_fsid_type()
559 } else if (!old_valid_dev(exp_sb(exp)->s_dev)) in set_version_and_fsid_type()
570 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, in fh_compose() argument
579 dev_t ex_dev = exp_sb(exp)->s_dev; in fh_compose()
583 (long) d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
591 set_version_and_fsid_type(fhp, exp, ref_fh); in fh_compose()
609 fhp->fh_export = exp_get(exp); in fh_compose()
618 d_inode(exp->ex_path.dentry)->i_ino, in fh_compose()
619 exp->ex_fsid, exp->ex_uuid); in fh_compose()
622 _fh_update(fhp, exp, dentry); in fh_compose()
750 struct svc_export * exp = fhp->fh_export; in fh_put() local
757 if (exp) { in fh_put()
758 exp_put(exp); in fh_put()