- size_t pos;
- struct hlist_node *cur;
-
- /* File that can be hardlinked--- search the table for an
- * existing inode matching the inode number and device;
- * otherwise create a new inode. */
- ret = new_dentry(name, &dentry);
- if (ret)
- return ret;
-
- /* Search for an existing inode having the same inode number and
- * device number. */
- pos = hash_u64(hash_u64(ino) + hash_u64(devno)) % table->capacity;
- hlist_for_each_entry(inode, cur, &table->array[pos], i_hlist) {
- if (inode->i_ino == ino && inode->i_devno == devno) {
- /* Found; use the existing inode. */
- inode_ref_blobs(inode);
- goto have_inode;
+ /* Hard link detection */
+ list = &table->array[hash_u64(hash_u64(ino) + hash_u64(devno))
+ % table->capacity];
+ hlist_for_each_entry(inode, list, i_hlist_node) {
+ if (inode->i_ino != ino || inode->i_devno != devno)
+ continue;
+ if (inode->i_attributes & FILE_ATTRIBUTE_DIRECTORY) {
+ WARNING("Not honoring directory hard link "
+ "of \"%"TS"\"",
+ inode_any_full_path(inode));
+ continue;