Lines Matching refs:exp

312 	struct svc_export *exp = container_of(ref, struct svc_export, h.ref);  in svc_export_put()  local
313 path_put(&exp->ex_path); in svc_export_put()
314 auth_domain_put(exp->ex_client); in svc_export_put()
315 nfsd4_fslocs_free(&exp->ex_fslocs); in svc_export_put()
316 kfree(exp->ex_uuid); in svc_export_put()
317 kfree(exp); in svc_export_put()
325 struct svc_export *exp = container_of(h, struct svc_export, h); in svc_export_request() local
328 qword_add(bpp, blen, exp->ex_client->name); in svc_export_request()
329 pth = d_path(&exp->ex_path, *bpp, *blen); in svc_export_request()
446 static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp) in secinfo_parse() argument
453 if (exp->ex_nflavors) in secinfo_parse()
462 for (f = exp->ex_flavors; f < exp->ex_flavors + listsize; f++) { in secinfo_parse()
476 if (~NFSEXP_SECINFO_FLAGS & (f->flags ^ exp->ex_flags)) in secinfo_parse()
479 exp->ex_nflavors = listsize; in secinfo_parse()
487 secinfo_parse(char **mesg, char *buf, struct svc_export *exp) { return 0; } in secinfo_parse() argument
518 struct svc_export exp = {}, *expp; in svc_export_parse() local
545 err = kern_path(buf, 0, &exp.ex_path); in svc_export_parse()
549 exp.ex_client = dom; in svc_export_parse()
550 exp.cd = cd; in svc_export_parse()
551 exp.ex_devid_map = NULL; in svc_export_parse()
555 exp.h.expiry_time = get_expiry(&mesg); in svc_export_parse()
556 if (exp.h.expiry_time == 0) in svc_export_parse()
563 set_bit(CACHE_NEGATIVE, &exp.h.flags); in svc_export_parse()
567 exp.ex_flags= an_int; in svc_export_parse()
573 exp.ex_anon_uid= make_kuid(&init_user_ns, an_int); in svc_export_parse()
579 exp.ex_anon_gid= make_kgid(&init_user_ns, an_int); in svc_export_parse()
585 exp.ex_fsid = an_int; in svc_export_parse()
589 err = fsloc_parse(&mesg, buf, &exp.ex_fslocs); in svc_export_parse()
591 err = nfsd_uuid_parse(&mesg, buf, &exp.ex_uuid); in svc_export_parse()
593 err = secinfo_parse(&mesg, buf, &exp); in svc_export_parse()
604 err = check_export(d_inode(exp.ex_path.dentry), &exp.ex_flags, in svc_export_parse()
605 exp.ex_uuid); in svc_export_parse()
613 if (exp.h.expiry_time < seconds_since_boot()) in svc_export_parse()
623 if (!uid_valid(exp.ex_anon_uid)) in svc_export_parse()
625 if (!gid_valid(exp.ex_anon_gid)) in svc_export_parse()
629 nfsd4_setup_layout_type(&exp); in svc_export_parse()
632 expp = svc_export_lookup(&exp); in svc_export_parse()
634 expp = svc_export_update(&exp, expp); in svc_export_parse()
643 nfsd4_fslocs_free(&exp.ex_fslocs); in svc_export_parse()
644 kfree(exp.ex_uuid); in svc_export_parse()
646 path_put(&exp.ex_path); in svc_export_parse()
656 static void show_secinfo(struct seq_file *m, struct svc_export *exp);
662 struct svc_export *exp ; in svc_export_show() local
668 exp = container_of(h, struct svc_export, h); in svc_export_show()
669 seq_path(m, &exp->ex_path, " \t\n\\"); in svc_export_show()
671 seq_escape(m, exp->ex_client->name, " \t\n\\"); in svc_export_show()
675 exp_flags(m, exp->ex_flags, exp->ex_fsid, in svc_export_show()
676 exp->ex_anon_uid, exp->ex_anon_gid, &exp->ex_fslocs); in svc_export_show()
677 if (exp->ex_uuid) { in svc_export_show()
683 seq_printf(m, "%02x", exp->ex_uuid[i]); in svc_export_show()
686 show_secinfo(m, exp); in svc_export_show()
767 svc_export_hash(struct svc_export *exp) in svc_export_hash() argument
771 hash = hash_ptr(exp->ex_client, EXPORT_HASHBITS); in svc_export_hash()
772 hash ^= hash_ptr(exp->ex_path.dentry, EXPORT_HASHBITS); in svc_export_hash()
773 hash ^= hash_ptr(exp->ex_path.mnt, EXPORT_HASHBITS); in svc_export_hash()
778 svc_export_lookup(struct svc_export *exp) in svc_export_lookup() argument
781 int hash = svc_export_hash(exp); in svc_export_lookup()
783 ch = sunrpc_cache_lookup(exp->cd, &exp->h, hash); in svc_export_lookup()
831 struct svc_export *exp, key; in exp_get_by_name() local
841 exp = svc_export_lookup(&key); in exp_get_by_name()
842 if (exp == NULL) in exp_get_by_name()
844 err = cache_check(cd, &exp->h, reqp); in exp_get_by_name()
847 return exp; in exp_get_by_name()
857 struct svc_export *exp = exp_get_by_name(cd, clp, path, NULL); in exp_parent() local
859 while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) { in exp_parent()
863 exp = exp_get_by_name(cd, clp, path, NULL); in exp_parent()
867 return exp; in exp_parent()
881 struct svc_export *exp; in exp_rootfh() local
900 exp = exp_parent(cd, clp, &path); in exp_rootfh()
901 if (IS_ERR(exp)) { in exp_rootfh()
902 err = PTR_ERR(exp); in exp_rootfh()
910 if (fh_compose(&fh, exp, path.dentry, NULL)) in exp_rootfh()
916 exp_put(exp); in exp_rootfh()
926 struct svc_export *exp; in exp_find() local
932 exp = exp_get_by_name(cd, clp, &ek->ek_path, reqp); in exp_find()
935 if (IS_ERR(exp)) in exp_find()
936 return ERR_CAST(exp); in exp_find()
937 return exp; in exp_find()
940 __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp) in check_nfsd_access() argument
943 struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; in check_nfsd_access()
946 if (exp->ex_client == rqstp->rq_gssclient) in check_nfsd_access()
949 for (f = exp->ex_flavors; f < end; f++) { in check_nfsd_access()
954 if (exp->ex_nflavors == 0) { in check_nfsd_access()
984 struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); in rqst_exp_get_by_name() local
992 exp = exp_get_by_name(cd, rqstp->rq_client, path, &rqstp->rq_chandle); in rqst_exp_get_by_name()
993 if (PTR_ERR(exp) == -ENOENT) in rqst_exp_get_by_name()
995 if (IS_ERR(exp)) in rqst_exp_get_by_name()
996 return exp; in rqst_exp_get_by_name()
998 if (exp->ex_nflavors > 0) in rqst_exp_get_by_name()
999 return exp; in rqst_exp_get_by_name()
1003 return exp; in rqst_exp_get_by_name()
1006 return exp; in rqst_exp_get_by_name()
1007 if (!IS_ERR(exp)) in rqst_exp_get_by_name()
1008 exp_put(exp); in rqst_exp_get_by_name()
1015 struct svc_export *gssexp, *exp = ERR_PTR(-ENOENT); in rqst_exp_find() local
1023 exp = exp_find(cd, rqstp->rq_client, fsid_type, in rqst_exp_find()
1025 if (PTR_ERR(exp) == -ENOENT) in rqst_exp_find()
1027 if (IS_ERR(exp)) in rqst_exp_find()
1028 return exp; in rqst_exp_find()
1030 if (exp->ex_nflavors > 0) in rqst_exp_find()
1031 return exp; in rqst_exp_find()
1035 return exp; in rqst_exp_find()
1039 return exp; in rqst_exp_find()
1040 if (!IS_ERR(exp)) in rqst_exp_find()
1041 exp_put(exp); in rqst_exp_find()
1049 struct svc_export *exp = rqst_exp_get_by_name(rqstp, path); in rqst_exp_parent() local
1051 while (PTR_ERR(exp) == -ENOENT && !IS_ROOT(path->dentry)) { in rqst_exp_parent()
1055 exp = rqst_exp_get_by_name(rqstp, path); in rqst_exp_parent()
1059 return exp; in rqst_exp_parent()
1079 struct svc_export *exp; in exp_pseudoroot() local
1082 exp = rqst_find_fsidzero_export(rqstp); in exp_pseudoroot()
1083 if (IS_ERR(exp)) in exp_pseudoroot()
1084 return nfserrno(PTR_ERR(exp)); in exp_pseudoroot()
1085 rv = fh_compose(fhp, exp, exp->ex_path.dentry, NULL); in exp_pseudoroot()
1086 exp_put(exp); in exp_pseudoroot()
1152 static void show_secinfo(struct seq_file *m, struct svc_export *exp) in show_secinfo() argument
1155 struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; in show_secinfo()
1158 if (exp->ex_nflavors == 0) in show_secinfo()
1160 f = exp->ex_flavors; in show_secinfo()
1162 if (!secinfo_flags_equal(flags, exp->ex_flags)) in show_secinfo()
1202 struct svc_export *exp = container_of(cp, struct svc_export, h); in e_show() local
1211 exp_get(exp); in e_show()
1212 if (cache_check(cd, &exp->h, NULL)) in e_show()
1214 exp_put(exp); in e_show()