Lines Matching full:item

108 	struct nfs_dns_ent *item;  in nfs_dns_ent_free_rcu()  local
110 item = container_of(head, struct nfs_dns_ent, rcu_head); in nfs_dns_ent_free_rcu()
111 kfree(item->hostname); in nfs_dns_ent_free_rcu()
112 kfree(item); in nfs_dns_ent_free_rcu()
117 struct nfs_dns_ent *item; in nfs_dns_ent_put() local
119 item = container_of(ref, struct nfs_dns_ent, h.ref); in nfs_dns_ent_put()
120 call_rcu(&item->rcu_head, nfs_dns_ent_free_rcu); in nfs_dns_ent_put()
125 struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); in nfs_dns_ent_alloc() local
127 if (item != NULL) { in nfs_dns_ent_alloc()
128 item->hostname = NULL; in nfs_dns_ent_alloc()
129 item->namelen = 0; in nfs_dns_ent_alloc()
130 item->addrlen = 0; in nfs_dns_ent_alloc()
131 return &item->h; in nfs_dns_ent_alloc()
181 struct nfs_dns_ent *item; in nfs_dns_show() local
188 item = container_of(h, struct nfs_dns_ent, h); in nfs_dns_show()
189 ttl = item->h.expiry_time - seconds_since_boot(); in nfs_dns_show()
196 rpc_ntop((struct sockaddr *)&item->addr, buf, sizeof(buf)); in nfs_dns_show()
200 seq_printf(m, "%15s %ld\n", item->hostname, ttl); in nfs_dns_show()
234 struct nfs_dns_ent key, *item; in nfs_dns_parse() local
265 item = nfs_dns_lookup(cd, &key); in nfs_dns_parse()
266 if (item == NULL) in nfs_dns_parse()
272 item = nfs_dns_update(cd, &key, item); in nfs_dns_parse()
273 if (item == NULL) in nfs_dns_parse()
277 cache_put(&item->h, cd); in nfs_dns_parse()
284 struct nfs_dns_ent **item, in do_cache_lookup() argument
289 *item = nfs_dns_lookup(cd, key); in do_cache_lookup()
290 if (*item) { in do_cache_lookup()
291 ret = cache_check(cd, &(*item)->h, &dreq->req); in do_cache_lookup()
293 *item = NULL; in do_cache_lookup()
300 struct nfs_dns_ent **item) in do_cache_lookup_nowait() argument
304 *item = nfs_dns_lookup(cd, key); in do_cache_lookup_nowait()
305 if (!*item) in do_cache_lookup_nowait()
308 if (!test_bit(CACHE_VALID, &(*item)->h.flags) in do_cache_lookup_nowait()
309 || (*item)->h.expiry_time < seconds_since_boot() in do_cache_lookup_nowait()
310 || cd->flush_time > (*item)->h.last_refresh) in do_cache_lookup_nowait()
313 if (test_bit(CACHE_NEGATIVE, &(*item)->h.flags)) in do_cache_lookup_nowait()
317 cache_put(&(*item)->h, cd); in do_cache_lookup_nowait()
319 *item = NULL; in do_cache_lookup_nowait()
325 struct nfs_dns_ent **item) in do_cache_lookup_wait() argument
333 ret = do_cache_lookup(cd, key, item, dreq); in do_cache_lookup_wait()
337 ret = do_cache_lookup_nowait(cd, key, item); in do_cache_lookup_wait()
351 struct nfs_dns_ent *item = NULL; in nfs_dns_resolve_name() local
355 ret = do_cache_lookup_wait(nn->nfs_dns_resolve, &key, &item); in nfs_dns_resolve_name()
357 if (salen >= item->addrlen) { in nfs_dns_resolve_name()
358 memcpy(ss, &item->addr, item->addrlen); in nfs_dns_resolve_name()
359 ret = item->addrlen; in nfs_dns_resolve_name()
362 cache_put(&item->h, nn->nfs_dns_resolve); in nfs_dns_resolve_name()