- struct list_head *cur_head;
- struct link_group *prev_group = NULL;
- struct link_group *cur_group = group;
- while (cur_group) {
- cur_head = cur_group->dentry_list;
- do {
- dentry = container_of(cur_head,
- struct dentry,
- link_group_list);
- dentry->hard_link = id;
- cur_head = cur_head->next;
- } while (cur_head != cur_group->dentry_list);
- cur_group->link_group_id = id;
- id++;
- prev_group = cur_group;
- cur_group = cur_group->next;
- }
- if (group && extra_groups) {
- prev_group->next = *extra_groups;
- *extra_groups = group;
- }
- return id;
-}
-
-/* Insert the link groups in the `extra_groups' list into the hash table */
-static void insert_extra_groups(struct link_group_table *table)
-{
- struct link_group *group, *next_group;
- size_t pos;
-
- group = table->extra_groups;
- while (group) {
- next_group = group->next;
- pos = group->link_group_id % table->capacity;
- group->next = table->array[pos];
- table->array[pos] = group;
- group = next_group;
- }
- table->extra_groups = NULL;
+ inode_for_each_dentry(dentry, inode)
+ printf("`%s'\n", dentry->full_path_utf8);