- * link group to be a true link group */
- if (list_empty(&dentries_with_data_streams))
- return fix_true_link_group(container_of(group->dentry_list,
- struct dentry,
- link_group_list));
-
- /* One or more dentries had data streams. We check each of these
- * dentries for consistency with the others to form a set of true link
- * groups. */
- num_true_link_groups = 0;
- list_for_each_entry_safe(dentry, tmp, &dentries_with_data_streams,
- tmp_list)
- {
- list_del(&dentry->tmp_list);
-
- /* Look for a true link group that is consistent with
- * this dentry and add this dentry to it. Or, if none
- * of the true link groups are consistent with this
- * dentry, make a new one. */
- list_for_each_entry(ref_dentry, &true_link_groups, tmp_list) {
- if (ref_dentries_consistent(ref_dentry, dentry)) {
- list_add(&dentry->link_group_list,
- &ref_dentry->link_group_list);
+ * inode to be a true inode */
+ if (list_empty(&dentries_with_data_streams)) {
+ #ifdef ENABLE_DEBUG
+ if (inode->i_nlink > 1) {
+ DEBUG("Found link group of size %u without "
+ "any data streams:", inode->i_nlink);
+ print_inode_dentries(inode);
+ DEBUG("We are going to interpret it as true "
+ "link group, provided that the dentries "
+ "are consistent.");
+ }
+ #endif
+ return fix_true_inode(inode, inode_list);
+ }
+
+ /* One or more dentries had data streams specified. We check each of
+ * these dentries for consistency with the others to form a set of true
+ * inodes. */
+ num_true_inodes = 0;
+ list_for_each_entry(dentry, &dentries_with_data_streams, tmp_list) {
+ /* Look for a true inode that is consistent with this dentry and
+ * add this dentry to it. Or, if none of the true inodes are
+ * consistent with this dentry, add a new one (if that happens,
+ * we have split the hard link group). */
+ hlist_for_each_entry(inode, cur, &true_inodes, i_hlist) {
+ if (ref_inodes_consistent(inode, dentry->d_inode)) {
+ inode_add_dentry(dentry, inode);