- /* See if we can make a hard link */
- list_for_each_entry(other, &dentry->link_group_list,
- link_group_list) {
- if (other->extracted_file) {
- /* Already extracted another dentry in the hard
- * link group. We can make a hard link instead
- * of extracting the file data. */
- ret = wim_apply_hardlink_ntfs(dentry, other,
+
+ if (inode->link_count > 1) {
+ /* Already extracted another dentry in the hard link
+ * group. We can make a hard link instead of extracting
+ * the file data. */
+ if (inode->extracted_file) {
+ ret = wim_apply_hardlink_ntfs(dentry, inode,