Lines Matching defs:fsloc
317 static void nfsd4_fslocs_free(struct nfsd4_fs_locations *fsloc)
319 struct nfsd4_fs_location *locations = fsloc->locations;
325 for (i = 0; i < fsloc->locations_count; i++) {
331 fsloc->locations = NULL;
455 fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc)
460 /* more than one fsloc */
461 if (fsloc->locations)
465 err = get_uint(mesg, &fsloc->locations_count);
468 if (fsloc->locations_count > MAX_FS_LOCATIONS)
470 if (fsloc->locations_count == 0)
473 fsloc->locations = kcalloc(fsloc->locations_count,
476 if (!fsloc->locations)
478 for (i=0; i < fsloc->locations_count; i++) {
485 fsloc->locations[i].hosts = kstrdup(buf, GFP_KERNEL);
486 if (!fsloc->locations[i].hosts)
494 fsloc->locations[i].path = kstrdup(buf, GFP_KERNEL);
495 if (!fsloc->locations[i].path)
505 fsloc->migrated = migrated;
508 nfsd4_fslocs_free(fsloc);
551 fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc){return 0;}
675 if (strcmp(buf, "fsloc") == 0)
1326 kuid_t anonu, kgid_t anong, struct nfsd4_fs_locations *fsloc)
1339 if (fsloc && fsloc->locations_count > 0) {
1340 char *loctype = (fsloc->migrated) ? "refer" : "replicas";
1344 seq_escape(m, fsloc->locations[0].path, ",;@ \t\n\\");
1346 seq_escape(m, fsloc->locations[0].hosts, ",;@ \t\n\\");
1347 for (i = 1; i < fsloc->locations_count; i++) {
1349 seq_escape(m, fsloc->locations[i].path, ",;@ \t\n\\");
1351 seq_escape(m, fsloc->locations[i].hosts, ",;@ \t\n\\");