Lines Matching defs:fsloc
310 static void nfsd4_fslocs_free(struct nfsd4_fs_locations *fsloc)
314 for (i = 0; i < fsloc->locations_count; i++) {
315 kfree(fsloc->locations[i].path);
316 kfree(fsloc->locations[i].hosts);
318 kfree(fsloc->locations);
405 fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc)
411 err = get_int(mesg, &fsloc->locations_count);
414 if (fsloc->locations_count > MAX_FS_LOCATIONS)
416 if (fsloc->locations_count == 0)
419 fsloc->locations = kzalloc(fsloc->locations_count
421 if (!fsloc->locations)
423 for (i=0; i < fsloc->locations_count; i++) {
430 fsloc->locations[i].hosts = kstrdup(buf, GFP_KERNEL);
431 if (!fsloc->locations[i].hosts)
439 fsloc->locations[i].path = kstrdup(buf, GFP_KERNEL);
440 if (!fsloc->locations[i].path)
450 fsloc->migrated = migrated;
453 nfsd4_fslocs_free(fsloc);
485 fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc){return 0;}
570 if (strcmp(buf, "fsloc") == 0)
1478 uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc)
1487 if (fsloc && fsloc->locations_count > 0) {
1488 char *loctype = (fsloc->migrated) ? "refer" : "replicas";
1492 seq_escape(m, fsloc->locations[0].path, ",;@ \t\n\\");
1494 seq_escape(m, fsloc->locations[0].hosts, ",;@ \t\n\\");
1495 for (i = 1; i < fsloc->locations_count; i++) {
1497 seq_escape(m, fsloc->locations[i].path, ",;@ \t\n\\");
1499 seq_escape(m, fsloc->locations[i].hosts, ",;@ \t\n\\");