Lines Matching refs:nc
912 struct auth_cache_clnt *nc; in nfsauth_cache_get() local
916 nc = kmem_alloc(sizeof (*nc), KM_NOSLEEP_LAZY); in nfsauth_cache_get()
917 if (nc == NULL) in nfsauth_cache_get()
923 nc->authc_addr = addr; in nfsauth_cache_get()
924 nc->authc_addr.buf = kmem_alloc(addr.maxlen, KM_NOSLEEP_LAZY); in nfsauth_cache_get()
925 if (addr.maxlen != 0 && nc->authc_addr.buf == NULL) { in nfsauth_cache_get()
926 kmem_free(nc, sizeof (*nc)); in nfsauth_cache_get()
929 bcopy(addr.buf, nc->authc_addr.buf, addr.len); in nfsauth_cache_get()
930 rw_init(&nc->authc_lock, NULL, RW_DEFAULT, NULL); in nfsauth_cache_get()
931 avl_create(&nc->authc_tree, nfsauth_cache_compar, in nfsauth_cache_get()
938 avl_insert(tree, nc, where); in nfsauth_cache_get()
940 c = nc; in nfsauth_cache_get()
944 avl_destroy(&nc->authc_tree); in nfsauth_cache_get()
945 rw_destroy(&nc->authc_lock); in nfsauth_cache_get()
946 kmem_free(nc->authc_addr.buf, nc->authc_addr.maxlen); in nfsauth_cache_get()
947 kmem_free(nc, sizeof (*nc)); in nfsauth_cache_get()