Lines Matching defs:dh
17 static void autofs_init_usage(struct autofs_dirhash *dh,
20 list_add_tail(&ent->exp, &dh->expiry_head);
29 void autofs_update_usage(struct autofs_dirhash *dh,
33 autofs_init_usage(dh,ent); /* Relink at queue tail */
40 struct autofs_dirhash *dh = &sbi->dirhash;
48 if ( list_empty(&dh->expiry_head) || sbi->catatonic )
51 ent = list_entry(dh->expiry_head.next, struct autofs_dir_ent, exp);
55 autofs_update_usage(dh, ent);
107 void autofs_initialize_hash(struct autofs_dirhash *dh) {
108 memset(&dh->h, 0, AUTOFS_HASH_SIZE*sizeof(struct autofs_dir_ent *));
109 INIT_LIST_HEAD(&dh->expiry_head);
112 struct autofs_dir_ent *autofs_hash_lookup(const struct autofs_dirhash *dh, struct qstr *name)
119 for ( dhn = dh->h[(unsigned) name->hash % AUTOFS_HASH_SIZE] ; dhn ; dhn = dhn->next ) {
129 void autofs_hash_insert(struct autofs_dirhash *dh, struct autofs_dir_ent *ent)
136 autofs_init_usage(dh,ent);
140 dhnp = &dh->h[(unsigned) ent->hash % AUTOFS_HASH_SIZE];
170 struct autofs_dir_ent *autofs_hash_enum(const struct autofs_dirhash *dh,
191 ent = dh->h[bucket];
219 void autofs_hash_dputall(struct autofs_dirhash *dh)
225 for ( ent = dh->h[i] ; ent ; ent = ent->next ) {