• Home
  • Raw
  • Download

Lines Matching refs:item

107 	struct nfs_dns_ent *item;  in nfs_dns_ent_free_rcu()  local
109 item = container_of(head, struct nfs_dns_ent, rcu_head); in nfs_dns_ent_free_rcu()
110 kfree(item->hostname); in nfs_dns_ent_free_rcu()
111 kfree(item); in nfs_dns_ent_free_rcu()
116 struct nfs_dns_ent *item; in nfs_dns_ent_put() local
118 item = container_of(ref, struct nfs_dns_ent, h.ref); in nfs_dns_ent_put()
119 call_rcu(&item->rcu_head, nfs_dns_ent_free_rcu); in nfs_dns_ent_put()
124 struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); in nfs_dns_ent_alloc() local
126 if (item != NULL) { in nfs_dns_ent_alloc()
127 item->hostname = NULL; in nfs_dns_ent_alloc()
128 item->namelen = 0; in nfs_dns_ent_alloc()
129 item->addrlen = 0; in nfs_dns_ent_alloc()
130 return &item->h; in nfs_dns_ent_alloc()
180 struct nfs_dns_ent *item; in nfs_dns_show() local
187 item = container_of(h, struct nfs_dns_ent, h); in nfs_dns_show()
188 ttl = item->h.expiry_time - seconds_since_boot(); in nfs_dns_show()
195 rpc_ntop((struct sockaddr *)&item->addr, buf, sizeof(buf)); in nfs_dns_show()
199 seq_printf(m, "%15s %ld\n", item->hostname, ttl); in nfs_dns_show()
233 struct nfs_dns_ent key, *item; in nfs_dns_parse() local
264 item = nfs_dns_lookup(cd, &key); in nfs_dns_parse()
265 if (item == NULL) in nfs_dns_parse()
271 item = nfs_dns_update(cd, &key, item); in nfs_dns_parse()
272 if (item == NULL) in nfs_dns_parse()
276 cache_put(&item->h, cd); in nfs_dns_parse()
283 struct nfs_dns_ent **item, in do_cache_lookup() argument
288 *item = nfs_dns_lookup(cd, key); in do_cache_lookup()
289 if (*item) { in do_cache_lookup()
290 ret = cache_check(cd, &(*item)->h, &dreq->req); in do_cache_lookup()
292 *item = NULL; in do_cache_lookup()
299 struct nfs_dns_ent **item) in do_cache_lookup_nowait() argument
303 *item = nfs_dns_lookup(cd, key); in do_cache_lookup_nowait()
304 if (!*item) in do_cache_lookup_nowait()
307 if (!test_bit(CACHE_VALID, &(*item)->h.flags) in do_cache_lookup_nowait()
308 || (*item)->h.expiry_time < seconds_since_boot() in do_cache_lookup_nowait()
309 || cd->flush_time > (*item)->h.last_refresh) in do_cache_lookup_nowait()
312 if (test_bit(CACHE_NEGATIVE, &(*item)->h.flags)) in do_cache_lookup_nowait()
316 cache_put(&(*item)->h, cd); in do_cache_lookup_nowait()
318 *item = NULL; in do_cache_lookup_nowait()
324 struct nfs_dns_ent **item) in do_cache_lookup_wait() argument
332 ret = do_cache_lookup(cd, key, item, dreq); in do_cache_lookup_wait()
336 ret = do_cache_lookup_nowait(cd, key, item); in do_cache_lookup_wait()
350 struct nfs_dns_ent *item = NULL; in nfs_dns_resolve_name() local
354 ret = do_cache_lookup_wait(nn->nfs_dns_resolve, &key, &item); in nfs_dns_resolve_name()
356 if (salen >= item->addrlen) { in nfs_dns_resolve_name()
357 memcpy(sa, &item->addr, item->addrlen); in nfs_dns_resolve_name()
358 ret = item->addrlen; in nfs_dns_resolve_name()
361 cache_put(&item->h, nn->nfs_dns_resolve); in nfs_dns_resolve_name()