Lines Matching refs:sysnames
380 struct afs_sysnames *sysnames = net->sysnames; in afs_proc_sysname_show() local
383 if (i < sysnames->nr) in afs_proc_sysname_show()
384 seq_printf(m, "%s\n", sysnames->subs[i]); in afs_proc_sysname_show()
396 names = net->sysnames; in afs_proc_sysname_start()
405 struct afs_sysnames *names = net->sysnames; in afs_proc_sysname_next()
433 struct afs_sysnames *sysnames, *kill; in afs_proc_sysname_write() local
439 sysnames = kzalloc(sizeof(*sysnames), GFP_KERNEL); in afs_proc_sysname_write()
440 if (!sysnames) in afs_proc_sysname_write()
442 refcount_set(&sysnames->usage, 1); in afs_proc_sysname_write()
443 kill = sysnames; in afs_proc_sysname_write()
470 if (sysnames->nr >= AFS_NR_SYSNAME) in afs_proc_sysname_write()
482 sysnames->subs[sysnames->nr] = sub; in afs_proc_sysname_write()
483 sysnames->nr++; in afs_proc_sysname_write()
486 if (sysnames->nr == 0) { in afs_proc_sysname_write()
487 sysnames->subs[0] = sysnames->blank; in afs_proc_sysname_write()
488 sysnames->nr++; in afs_proc_sysname_write()
492 kill = net->sysnames; in afs_proc_sysname_write()
493 net->sysnames = sysnames; in afs_proc_sysname_write()
506 void afs_put_sysnames(struct afs_sysnames *sysnames) in afs_put_sysnames() argument
510 if (sysnames && refcount_dec_and_test(&sysnames->usage)) { in afs_put_sysnames()
511 for (i = 0; i < sysnames->nr; i++) in afs_put_sysnames()
512 if (sysnames->subs[i] != afs_init_sysname && in afs_put_sysnames()
513 sysnames->subs[i] != sysnames->blank) in afs_put_sysnames()
514 kfree(sysnames->subs[i]); in afs_put_sysnames()
515 kfree(sysnames); in afs_put_sysnames()