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