Lines Matching refs:new
277 struct nsm_handle *new; in nsm_create_handle() local
279 new = kzalloc(sizeof(*new) + hostname_len + 1, GFP_KERNEL); in nsm_create_handle()
280 if (unlikely(new == NULL)) in nsm_create_handle()
283 refcount_set(&new->sm_count, 1); in nsm_create_handle()
284 new->sm_name = (char *)(new + 1); in nsm_create_handle()
285 memcpy(nsm_addr(new), sap, salen); in nsm_create_handle()
286 new->sm_addrlen = salen; in nsm_create_handle()
287 nsm_init_private(new); in nsm_create_handle()
289 if (rpc_ntop(nsm_addr(new), new->sm_addrbuf, in nsm_create_handle()
290 sizeof(new->sm_addrbuf)) == 0) in nsm_create_handle()
291 (void)snprintf(new->sm_addrbuf, sizeof(new->sm_addrbuf), in nsm_create_handle()
293 memcpy(new->sm_name, hostname, hostname_len); in nsm_create_handle()
294 new->sm_name[hostname_len] = '\0'; in nsm_create_handle()
296 return new; in nsm_create_handle()
319 struct nsm_handle *cached, *new = NULL; in nsm_get_handle() local
343 kfree(new); in nsm_get_handle()
351 if (new != NULL) { in nsm_get_handle()
352 list_add(&new->sm_link, &ln->nsm_handles); in nsm_get_handle()
355 new->sm_name, new->sm_addrbuf); in nsm_get_handle()
356 return new; in nsm_get_handle()
361 new = nsm_create_handle(sap, salen, hostname, hostname_len); in nsm_get_handle()
362 if (unlikely(new == NULL)) in nsm_get_handle()