Lines Matching refs: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;
447 fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc)
452 /* more than one fsloc */
453 if (fsloc->locations)
457 err = get_uint(mesg, &fsloc->locations_count);
460 if (fsloc->locations_count > MAX_FS_LOCATIONS)
462 if (fsloc->locations_count == 0)
465 fsloc->locations = kcalloc(fsloc->locations_count,
468 if (!fsloc->locations)
470 for (i=0; i < fsloc->locations_count; i++) {
477 fsloc->locations[i].hosts = kstrdup(buf, GFP_KERNEL);
478 if (!fsloc->locations[i].hosts)
486 fsloc->locations[i].path = kstrdup(buf, GFP_KERNEL);
487 if (!fsloc->locations[i].path)
497 fsloc->migrated = migrated;
500 nfsd4_fslocs_free(fsloc);
543 fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc){return 0;}
667 if (strcmp(buf, "fsloc") == 0)
1309 kuid_t anonu, kgid_t anong, struct nfsd4_fs_locations *fsloc)
1322 if (fsloc && fsloc->locations_count > 0) {
1323 char *loctype = (fsloc->migrated) ? "refer" : "replicas";
1327 seq_escape(m, fsloc->locations[0].path, ",;@ \t\n\\");
1329 seq_escape(m, fsloc->locations[0].hosts, ",;@ \t\n\\");
1330 for (i = 1; i < fsloc->locations_count; i++) {
1332 seq_escape(m, fsloc->locations[i].path, ",;@ \t\n\\");
1334 seq_escape(m, fsloc->locations[i].hosts, ",;@ \t\n\\");