+ hlist_for_each_safe(cur, tmp, &table->extra_inodes)
+ hlist_add_head(cur, inode_list);
+ return 0;
+}
+
+int dentry_tree_fix_inodes(struct dentry *root, struct hlist_head *inode_list)
+{
+ struct inode_table inode_tab;
+ int ret;
+
+ DEBUG("Inserting dentries into inode table");
+ ret = init_inode_table(&inode_tab, 9001);
+ if (ret != 0)
+ return ret;
+
+ for_dentry_in_tree(root, inode_table_insert, &inode_tab);
+
+ DEBUG("Cleaning up the hard link groups");
+ ret = fix_inodes(&inode_tab, inode_list);
+ destroy_inode_table(&inode_tab);