Lines Matching defs:item
98 struct nfs_dns_ent *item;
100 item = container_of(ref, struct nfs_dns_ent, h.ref);
101 kfree(item->hostname);
102 kfree(item);
107 struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL);
109 if (item != NULL) {
110 item->hostname = NULL;
111 item->namelen = 0;
112 item->addrlen = 0;
113 return &item->h;
162 struct nfs_dns_ent *item;
169 item = container_of(h, struct nfs_dns_ent, h);
170 ttl = (long)item->h.expiry_time - (long)get_seconds();
177 rpc_ntop((struct sockaddr *)&item->addr, buf, sizeof(buf));
181 seq_printf(m, "%15s %ld\n", item->hostname, ttl);
215 struct nfs_dns_ent key, *item;
245 item = nfs_dns_lookup(cd, &key);
246 if (item == NULL)
252 item = nfs_dns_update(cd, &key, item);
253 if (item == NULL)
257 cache_put(&item->h, cd);
279 struct nfs_dns_ent **item,
284 *item = nfs_dns_lookup(cd, key);
285 if (*item) {
286 ret = cache_check(cd, &(*item)->h, &dreq->req);
288 *item = NULL;
295 struct nfs_dns_ent **item)
299 *item = nfs_dns_lookup(cd, key);
300 if (!*item)
303 if (!test_bit(CACHE_VALID, &(*item)->h.flags)
304 || (*item)->h.expiry_time < get_seconds()
305 || cd->flush_time > (*item)->h.last_refresh)
308 if (test_bit(CACHE_NEGATIVE, &(*item)->h.flags))
312 cache_put(&(*item)->h, cd);
314 *item = NULL;
320 struct nfs_dns_ent **item)
328 ret = do_cache_lookup(cd, key, item, dreq);
332 ret = do_cache_lookup_nowait(cd, key, item);
346 struct nfs_dns_ent *item = NULL;
349 ret = do_cache_lookup_wait(&nfs_dns_resolve, &key, &item);
351 if (salen >= item->addrlen) {
352 memcpy(sa, &item->addr, item->addrlen);
353 ret = item->addrlen;
356 cache_put(&item->h, &nfs_dns_resolve);