Lines Matching refs:exp
358 struct svc_export *exp = container_of(rcu_head, struct svc_export, in svc_export_release() local
361 nfsd4_fslocs_free(&exp->ex_fslocs); in svc_export_release()
362 export_stats_destroy(exp->ex_stats); in svc_export_release()
363 kfree(exp->ex_stats); in svc_export_release()
364 kfree(exp->ex_uuid); in svc_export_release()
365 kfree(exp); in svc_export_release()
370 struct svc_export *exp = container_of(ref, struct svc_export, h.ref); in svc_export_put() local
372 path_put(&exp->ex_path); in svc_export_put()
373 auth_domain_put(exp->ex_client); in svc_export_put()
374 call_rcu(&exp->ex_rcu, svc_export_release); in svc_export_put()
387 struct svc_export *exp = container_of(h, struct svc_export, h); in svc_export_request() local
390 qword_add(bpp, blen, exp->ex_client->name); in svc_export_request()
391 pth = d_path(&exp->ex_path, *bpp, *blen); in svc_export_request()
519 static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp) in secinfo_parse() argument
526 if (exp->ex_nflavors) in secinfo_parse()
535 for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) { in secinfo_parse()
549 if (~NFSEXP_SECINFO_FLAGS & (f->flags ^ exp->ex_flags)) in secinfo_parse()
552 exp->ex_nflavors = listsize; in secinfo_parse()
560 secinfo_parse(char **mesg, char *buf, struct svc_export *exp) { return 0; } in secinfo_parse() argument
563 static int xprtsec_parse(char **mesg, char *buf, struct svc_export *exp) in xprtsec_parse() argument
574 exp->ex_xprtsec_modes = 0; in xprtsec_parse()
581 exp->ex_xprtsec_modes |= mode; in xprtsec_parse()
613 struct svc_export exp = {}, *expp; in svc_export_parse() local
639 err = kern_path(buf, 0, &exp.ex_path); in svc_export_parse()
643 exp.ex_client = dom; in svc_export_parse()
644 exp.cd = cd; in svc_export_parse()
645 exp.ex_devid_map = NULL; in svc_export_parse()
646 exp.ex_xprtsec_modes = NFSEXP_XPRTSEC_ALL; in svc_export_parse()
649 err = get_expiry(&mesg, &exp.h.expiry_time); in svc_export_parse()
657 set_bit(CACHE_NEGATIVE, &exp.h.flags); in svc_export_parse()
661 exp.ex_flags= an_int; in svc_export_parse()
667 exp.ex_anon_uid= make_kuid(current_user_ns(), an_int); in svc_export_parse()
673 exp.ex_anon_gid= make_kgid(current_user_ns(), an_int); in svc_export_parse()
679 exp.ex_fsid = an_int; in svc_export_parse()
683 err = fsloc_parse(&mesg, buf, &exp.ex_fslocs); in svc_export_parse()
685 err = nfsd_uuid_parse(&mesg, buf, &exp.ex_uuid); in svc_export_parse()
687 err = secinfo_parse(&mesg, buf, &exp); in svc_export_parse()
689 err = xprtsec_parse(&mesg, buf, &exp); in svc_export_parse()
700 err = check_export(&exp.ex_path, &exp.ex_flags, exp.ex_uuid); in svc_export_parse()
709 if (exp.h.expiry_time < seconds_since_boot()) in svc_export_parse()
719 if (!uid_valid(exp.ex_anon_uid)) in svc_export_parse()
721 if (!gid_valid(exp.ex_anon_gid)) in svc_export_parse()
725 nfsd4_setup_layout_type(&exp); in svc_export_parse()
728 expp = svc_export_lookup(&exp); in svc_export_parse()
733 expp = svc_export_update(&exp, expp); in svc_export_parse()
741 nfsd4_fslocs_free(&exp.ex_fslocs); in svc_export_parse()
742 kfree(exp.ex_uuid); in svc_export_parse()
744 path_put(&exp.ex_path); in svc_export_parse()
754 static void show_secinfo(struct seq_file *m, struct svc_export *exp);
770 struct svc_export *exp; in svc_export_show() local
780 exp = container_of(h, struct svc_export, h); in svc_export_show()
781 seq_path(m, &exp->ex_path, " \t\n\\"); in svc_export_show()
783 seq_escape(m, exp->ex_client->name, " \t\n\\"); in svc_export_show()
785 struct percpu_counter *counter = exp->ex_stats->counter; in svc_export_show()
787 seq_printf(m, "\t%lld\n", exp->ex_stats->start_time); in svc_export_show()
800 exp_flags(m, exp->ex_flags, exp->ex_fsid, in svc_export_show()
801 exp->ex_anon_uid, exp->ex_anon_gid, &exp->ex_fslocs); in svc_export_show()
802 if (exp->ex_uuid) { in svc_export_show()
808 seq_printf(m, "%02x", exp->ex_uuid[i]); in svc_export_show()
811 show_secinfo(m, exp); in svc_export_show()
907 svc_export_hash(struct svc_export *exp) in svc_export_hash() argument
911 hash = hash_ptr(exp->ex_client, EXPORT_HASHBITS); in svc_export_hash()
912 hash ^= hash_ptr(exp->ex_path.dentry, EXPORT_HASHBITS); in svc_export_hash()
913 hash ^= hash_ptr(exp->ex_path.mnt, EXPORT_HASHBITS); in svc_export_hash()
918 svc_export_lookup(struct svc_export *exp) in svc_export_lookup() argument
921 int hash = svc_export_hash(exp); in svc_export_lookup()
923 ch = sunrpc_cache_lookup_rcu(exp->cd, &exp->h, hash); in svc_export_lookup()
973 struct svc_export *exp, key; in exp_get_by_name() local
983 exp = svc_export_lookup(&key); in exp_get_by_name()
984 if (exp == NULL) in exp_get_by_name()
986 err = cache_check(cd, &exp->h, reqp); in exp_get_by_name()
991 return exp; in exp_get_by_name()
1001 struct svc_export *exp = exp_get_by_name(cd, clp, path, NULL); in exp_parent() local
1003 while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) { in exp_parent()
1007 exp = exp_get_by_name(cd, clp, path, NULL); in exp_parent()
1011 return exp; in exp_parent()
1025 struct svc_export *exp; in exp_rootfh() local
1044 exp = exp_parent(cd, clp, &path); in exp_rootfh()
1045 if (IS_ERR(exp)) { in exp_rootfh()
1046 err = PTR_ERR(exp); in exp_rootfh()
1054 if (fh_compose(&fh, exp, path.dentry, NULL)) in exp_rootfh()
1060 exp_put(exp); in exp_rootfh()
1070 struct svc_export *exp; in exp_find() local
1076 exp = exp_get_by_name(cd, clp, &ek->ek_path, reqp); in exp_find()
1079 if (IS_ERR(exp)) in exp_find()
1080 return ERR_CAST(exp); in exp_find()
1081 return exp; in exp_find()
1094 __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp, in check_nfsd_access() argument
1097 struct exp_flavor_info *f, *end = exp->ex_flavors + exp->ex_nflavors; in check_nfsd_access()
1111 if (exp->ex_xprtsec_modes & NFSEXP_XPRTSEC_NONE) { in check_nfsd_access()
1115 if (exp->ex_xprtsec_modes & NFSEXP_XPRTSEC_TLS) { in check_nfsd_access()
1120 if (exp->ex_xprtsec_modes & NFSEXP_XPRTSEC_MTLS) { in check_nfsd_access()
1130 if (exp->ex_client == rqstp->rq_gssclient) in check_nfsd_access()
1133 for (f = exp->ex_flavors; f < end; f++) { in check_nfsd_access()
1138 if (exp->ex_nflavors == 0) { in check_nfsd_access()
1164 for (f = exp->ex_flavors; f < end; f++) { in check_nfsd_access()
1186 struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); in rqst_exp_get_by_name() local
1194 exp = exp_get_by_name(cd, rqstp->rq_client, path, &rqstp->rq_chandle); in rqst_exp_get_by_name()
1195 if (PTR_ERR(exp) == -ENOENT) in rqst_exp_get_by_name()
1197 if (IS_ERR(exp)) in rqst_exp_get_by_name()
1198 return exp; in rqst_exp_get_by_name()
1200 if (exp->ex_nflavors > 0) in rqst_exp_get_by_name()
1201 return exp; in rqst_exp_get_by_name()
1205 return exp; in rqst_exp_get_by_name()
1208 return exp; in rqst_exp_get_by_name()
1209 if (!IS_ERR(exp)) in rqst_exp_get_by_name()
1210 exp_put(exp); in rqst_exp_get_by_name()
1235 struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); in rqst_exp_find() local
1242 exp = exp_find(cd, cl, fsid_type, fsidv, reqp); in rqst_exp_find()
1243 if (PTR_ERR(exp) == -ENOENT) in rqst_exp_find()
1245 if (IS_ERR(exp)) in rqst_exp_find()
1246 return exp; in rqst_exp_find()
1248 if (exp->ex_nflavors > 0) in rqst_exp_find()
1249 return exp; in rqst_exp_find()
1253 return exp; in rqst_exp_find()
1256 return exp; in rqst_exp_find()
1257 if (!IS_ERR(exp)) in rqst_exp_find()
1258 exp_put(exp); in rqst_exp_find()
1266 struct svc_export *exp = rqst_exp_get_by_name(rqstp, path); in rqst_exp_parent() local
1268 while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) { in rqst_exp_parent()
1272 exp = rqst_exp_get_by_name(rqstp, path); in rqst_exp_parent()
1276 return exp; in rqst_exp_parent()
1298 struct svc_export *exp; in exp_pseudoroot() local
1301 exp = rqst_find_fsidzero_export(rqstp); in exp_pseudoroot()
1302 if (IS_ERR(exp)) in exp_pseudoroot()
1303 return nfserrno(PTR_ERR(exp)); in exp_pseudoroot()
1304 rv = fh_compose(fhp, exp, exp->ex_path.dentry, NULL); in exp_pseudoroot()
1305 exp_put(exp); in exp_pseudoroot()
1371 static void show_secinfo(struct seq_file *m, struct svc_export *exp) in show_secinfo() argument
1374 struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; in show_secinfo()
1377 if (exp->ex_nflavors == 0) in show_secinfo()
1379 f = exp->ex_flavors; in show_secinfo()
1381 if (!secinfo_flags_equal(flags, exp->ex_flags)) in show_secinfo()
1423 struct svc_export *exp = container_of(cp, struct svc_export, h); in e_show() local
1436 if (cache_check_rcu(cd, &exp->h, NULL)) in e_show()