Lines Matching full:item
106 struct nfs_dns_ent *item; in nfs_dns_ent_free_rcu() local
108 item = container_of(head, struct nfs_dns_ent, rcu_head); in nfs_dns_ent_free_rcu()
109 kfree(item->hostname); in nfs_dns_ent_free_rcu()
110 kfree(item); in nfs_dns_ent_free_rcu()
115 struct nfs_dns_ent *item; in nfs_dns_ent_put() local
117 item = container_of(ref, struct nfs_dns_ent, h.ref); in nfs_dns_ent_put()
118 call_rcu(&item->rcu_head, nfs_dns_ent_free_rcu); in nfs_dns_ent_put()
123 struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); in nfs_dns_ent_alloc() local
125 if (item != NULL) { in nfs_dns_ent_alloc()
126 item->hostname = NULL; in nfs_dns_ent_alloc()
127 item->namelen = 0; in nfs_dns_ent_alloc()
128 item->addrlen = 0; in nfs_dns_ent_alloc()
129 return &item->h; in nfs_dns_ent_alloc()
179 struct nfs_dns_ent *item; in nfs_dns_show() local
186 item = container_of(h, struct nfs_dns_ent, h); in nfs_dns_show()
187 ttl = item->h.expiry_time - seconds_since_boot(); in nfs_dns_show()
194 rpc_ntop((struct sockaddr *)&item->addr, buf, sizeof(buf)); in nfs_dns_show()
198 seq_printf(m, "%15s %ld\n", item->hostname, ttl); in nfs_dns_show()
232 struct nfs_dns_ent key, *item; in nfs_dns_parse() local
263 item = nfs_dns_lookup(cd, &key); in nfs_dns_parse()
264 if (item == NULL) in nfs_dns_parse()
270 item = nfs_dns_update(cd, &key, item); in nfs_dns_parse()
271 if (item == NULL) in nfs_dns_parse()
275 cache_put(&item->h, cd); in nfs_dns_parse()
282 struct nfs_dns_ent **item, in do_cache_lookup() argument
287 *item = nfs_dns_lookup(cd, key); in do_cache_lookup()
288 if (*item) { in do_cache_lookup()
289 ret = cache_check(cd, &(*item)->h, &dreq->req); in do_cache_lookup()
291 *item = NULL; in do_cache_lookup()
298 struct nfs_dns_ent **item) in do_cache_lookup_nowait() argument
302 *item = nfs_dns_lookup(cd, key); in do_cache_lookup_nowait()
303 if (!*item) in do_cache_lookup_nowait()
306 if (!test_bit(CACHE_VALID, &(*item)->h.flags) in do_cache_lookup_nowait()
307 || (*item)->h.expiry_time < seconds_since_boot() in do_cache_lookup_nowait()
308 || cd->flush_time > (*item)->h.last_refresh) in do_cache_lookup_nowait()
311 if (test_bit(CACHE_NEGATIVE, &(*item)->h.flags)) in do_cache_lookup_nowait()
315 cache_put(&(*item)->h, cd); in do_cache_lookup_nowait()
317 *item = NULL; in do_cache_lookup_nowait()
323 struct nfs_dns_ent **item) in do_cache_lookup_wait() argument
331 ret = do_cache_lookup(cd, key, item, dreq); in do_cache_lookup_wait()
335 ret = do_cache_lookup_nowait(cd, key, item); in do_cache_lookup_wait()
349 struct nfs_dns_ent *item = NULL; in nfs_dns_resolve_name() local
353 ret = do_cache_lookup_wait(nn->nfs_dns_resolve, &key, &item); in nfs_dns_resolve_name()
355 if (salen >= item->addrlen) { in nfs_dns_resolve_name()
356 memcpy(ss, &item->addr, item->addrlen); in nfs_dns_resolve_name()
357 ret = item->addrlen; in nfs_dns_resolve_name()
360 cache_put(&item->h, nn->nfs_dns_resolve); in nfs_dns_resolve_name()