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