}
/* Try adding this dentry to an existing inode. */
- pos = d_inode->i_ino % table->capacity;
+ pos = hash_inode(table, d_inode->i_ino, 0);
hlist_for_each_entry(inode, &table->array[pos], i_hlist_node) {
if (inode->i_ino != d_inode->i_ino) {
continue;
/* Keep this dentry's inode. */
hlist_add_head(&d_inode->i_hlist_node, &table->array[pos]);
+ if (++table->filled > table->capacity)
+ enlarge_inode_table(table);
return 0;
}
/* We use a hash table to map inode numbers to inodes. */
- ret = init_inode_table(¶ms.inode_table, 9001);
+ ret = init_inode_table(¶ms.inode_table, 64);
if (ret)
return ret;