Lines Matching refs:item

105 	struct nfs_dns_ent *item;  in nfs_dns_ent_put()  local
107 item = container_of(ref, struct nfs_dns_ent, h.ref); in nfs_dns_ent_put()
108 kfree(item->hostname); in nfs_dns_ent_put()
109 kfree(item); in nfs_dns_ent_put()
114 struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); in nfs_dns_ent_alloc() local
116 if (item != NULL) { in nfs_dns_ent_alloc()
117 item->hostname = NULL; in nfs_dns_ent_alloc()
118 item->namelen = 0; in nfs_dns_ent_alloc()
119 item->addrlen = 0; in nfs_dns_ent_alloc()
120 return &item->h; in nfs_dns_ent_alloc()
169 struct nfs_dns_ent *item; in nfs_dns_show() local
176 item = container_of(h, struct nfs_dns_ent, h); in nfs_dns_show()
177 ttl = item->h.expiry_time - seconds_since_boot(); in nfs_dns_show()
184 rpc_ntop((struct sockaddr *)&item->addr, buf, sizeof(buf)); in nfs_dns_show()
188 seq_printf(m, "%15s %ld\n", item->hostname, ttl); in nfs_dns_show()
222 struct nfs_dns_ent key, *item; in nfs_dns_parse() local
253 item = nfs_dns_lookup(cd, &key); in nfs_dns_parse()
254 if (item == NULL) in nfs_dns_parse()
260 item = nfs_dns_update(cd, &key, item); in nfs_dns_parse()
261 if (item == NULL) in nfs_dns_parse()
265 cache_put(&item->h, cd); in nfs_dns_parse()
272 struct nfs_dns_ent **item, in do_cache_lookup() argument
277 *item = nfs_dns_lookup(cd, key); in do_cache_lookup()
278 if (*item) { in do_cache_lookup()
279 ret = cache_check(cd, &(*item)->h, &dreq->req); in do_cache_lookup()
281 *item = NULL; in do_cache_lookup()
288 struct nfs_dns_ent **item) in do_cache_lookup_nowait() argument
292 *item = nfs_dns_lookup(cd, key); in do_cache_lookup_nowait()
293 if (!*item) in do_cache_lookup_nowait()
296 if (!test_bit(CACHE_VALID, &(*item)->h.flags) in do_cache_lookup_nowait()
297 || (*item)->h.expiry_time < seconds_since_boot() in do_cache_lookup_nowait()
298 || cd->flush_time > (*item)->h.last_refresh) in do_cache_lookup_nowait()
301 if (test_bit(CACHE_NEGATIVE, &(*item)->h.flags)) in do_cache_lookup_nowait()
305 cache_put(&(*item)->h, cd); in do_cache_lookup_nowait()
307 *item = NULL; in do_cache_lookup_nowait()
313 struct nfs_dns_ent **item) in do_cache_lookup_wait() argument
321 ret = do_cache_lookup(cd, key, item, dreq); in do_cache_lookup_wait()
325 ret = do_cache_lookup_nowait(cd, key, item); in do_cache_lookup_wait()
339 struct nfs_dns_ent *item = NULL; in nfs_dns_resolve_name() local
343 ret = do_cache_lookup_wait(nn->nfs_dns_resolve, &key, &item); in nfs_dns_resolve_name()
345 if (salen >= item->addrlen) { in nfs_dns_resolve_name()
346 memcpy(sa, &item->addr, item->addrlen); in nfs_dns_resolve_name()
347 ret = item->addrlen; in nfs_dns_resolve_name()
350 cache_put(&item->h, nn->nfs_dns_resolve); in nfs_dns_resolve_name()