Lines Matching refs:ent

63 struct ent {
80 struct ent *new = container_of(cnew, struct ent, h);
81 struct ent *itm = container_of(citm, struct ent, h);
93 struct ent *map = container_of(ref, struct ent, h.ref);
100 struct ent *e = kmalloc(sizeof(*e), GFP_KERNEL);
112 idtoname_hash(struct ent *ent)
116 hash = hash_str(ent->authname, ENT_HASHBITS);
117 hash = hash_long(hash ^ ent->id, ENT_HASHBITS);
120 if (ent->type == IDMAP_TYPE_GROUP)
136 struct ent *ent = container_of(ch, struct ent, h);
139 qword_add(bpp, blen, ent->authname);
140 snprintf(idstr, sizeof(idstr), "%u", ent->id);
141 qword_add(bpp, blen, ent->type == IDMAP_TYPE_GROUP ? "group" : "user");
150 struct ent *a = container_of(ca, struct ent, h);
151 struct ent *b = container_of(cb, struct ent, h);
160 struct ent *ent;
166 ent = container_of(h, struct ent, h);
167 seq_printf(m, "%s %s %u", ent->authname,
168 ent->type == IDMAP_TYPE_GROUP ? "group" : "user",
169 ent->id);
171 seq_printf(m, " %s", ent->name);
185 static struct ent *idtoname_lookup(struct cache_detail *, struct ent *);
186 static struct ent *idtoname_update(struct cache_detail *, struct ent *,
187 struct ent *);
208 struct ent ent, *res;
221 memset(&ent, 0, sizeof(ent));
227 memcpy(ent.authname, buf1, sizeof(ent.authname));
232 ent.type = strcmp(buf1, "user") == 0 ?
238 ent.id = simple_strtoul(buf1, &bp, 10);
243 error = get_expiry(&buf, &ent.h.expiry_time);
248 res = idtoname_lookup(cd, &ent);
258 set_bit(CACHE_NEGATIVE, &ent.h.flags);
260 memcpy(ent.name, buf1, sizeof(ent.name));
262 res = idtoname_update(cd, &ent, res);
273 static struct ent *
274 idtoname_lookup(struct cache_detail *cd, struct ent *item)
279 return container_of(ch, struct ent, h);
284 static struct ent *
285 idtoname_update(struct cache_detail *cd, struct ent *new, struct ent *old)
290 return container_of(ch, struct ent, h);
301 nametoid_hash(struct ent *ent)
303 return hash_str(ent->name, ENT_HASHBITS);
316 struct ent *ent = container_of(ch, struct ent, h);
318 qword_add(bpp, blen, ent->authname);
319 qword_add(bpp, blen, ent->type == IDMAP_TYPE_GROUP ? "group" : "user");
320 qword_add(bpp, blen, ent->name);
328 struct ent *a = container_of(ca, struct ent, h);
329 struct ent *b = container_of(cb, struct ent, h);
338 struct ent *ent;
344 ent = container_of(h, struct ent, h);
345 seq_printf(m, "%s %s %s", ent->authname,
346 ent->type == IDMAP_TYPE_GROUP ? "group" : "user",
347 ent->name);
349 seq_printf(m, " %u", ent->id);
354 static struct ent *nametoid_lookup(struct cache_detail *, struct ent *);
355 static struct ent *nametoid_update(struct cache_detail *, struct ent *,
356 struct ent *);
378 struct ent ent, *res;
390 memset(&ent, 0, sizeof(ent));
396 memcpy(ent.authname, buf1, sizeof(ent.authname));
401 ent.type = strcmp(buf1, "user") == 0 ?
408 memcpy(ent.name, buf1, sizeof(ent.name));
411 error = get_expiry(&buf, &ent.h.expiry_time);
416 error = get_int(&buf, &ent.id);
420 set_bit(CACHE_NEGATIVE, &ent.h.flags);
423 res = nametoid_lookup(cd, &ent);
426 res = nametoid_update(cd, &ent, res);
438 static struct ent *
439 nametoid_lookup(struct cache_detail *cd, struct ent *item)
444 return container_of(ch, struct ent, h);
449 static struct ent *
450 nametoid_update(struct cache_detail *cd, struct ent *new, struct ent *old)
455 return container_of(ch, struct ent, h);
508 struct ent *(*lookup_fn)(struct cache_detail *, struct ent *),
509 struct ent *key, struct cache_detail *detail, struct ent **item)
520 struct ent *prev_item = *item;
542 struct ent *item, key = {
580 struct ent *item, key = {