Lines Matching refs:sysnames
430 struct afs_sysnames *sysnames = net->sysnames; in afs_proc_sysname_show() local
433 if (i < sysnames->nr) in afs_proc_sysname_show()
434 seq_printf(m, "%s\n", sysnames->subs[i]); in afs_proc_sysname_show()
446 names = net->sysnames; in afs_proc_sysname_start()
455 struct afs_sysnames *names = net->sysnames; in afs_proc_sysname_next()
483 struct afs_sysnames *sysnames, *kill; in afs_proc_sysname_write() local
489 sysnames = kzalloc(sizeof(*sysnames), GFP_KERNEL); in afs_proc_sysname_write()
490 if (!sysnames) in afs_proc_sysname_write()
492 refcount_set(&sysnames->usage, 1); in afs_proc_sysname_write()
493 kill = sysnames; in afs_proc_sysname_write()
520 if (sysnames->nr >= AFS_NR_SYSNAME) in afs_proc_sysname_write()
532 sysnames->subs[sysnames->nr] = sub; in afs_proc_sysname_write()
533 sysnames->nr++; in afs_proc_sysname_write()
536 if (sysnames->nr == 0) { in afs_proc_sysname_write()
537 sysnames->subs[0] = sysnames->blank; in afs_proc_sysname_write()
538 sysnames->nr++; in afs_proc_sysname_write()
542 kill = net->sysnames; in afs_proc_sysname_write()
543 net->sysnames = sysnames; in afs_proc_sysname_write()
556 void afs_put_sysnames(struct afs_sysnames *sysnames) in afs_put_sysnames() argument
560 if (sysnames && refcount_dec_and_test(&sysnames->usage)) { in afs_put_sysnames()
561 for (i = 0; i < sysnames->nr; i++) in afs_put_sysnames()
562 if (sysnames->subs[i] != afs_init_sysname && in afs_put_sysnames()
563 sysnames->subs[i] != sysnames->blank) in afs_put_sysnames()
564 kfree(sysnames->subs[i]); in afs_put_sysnames()