-void inode_resolve_ltes(struct inode *inode, struct lookup_table *table)
-{
- struct lookup_table_entry *lte;
-
- wimlib_assert(!inode->resolved);
-
- /* Resolve the default file stream */
- lte = __lookup_resource(table, inode->hash);
- inode->lte = lte;
- inode->resolved = 1;
-
- /* Resolve the alternate data streams */
- for (u16 i = 0; i < inode->num_ads; i++) {
- struct ads_entry *cur_entry = &inode->ads_entries[i];
- lte = __lookup_resource(table, cur_entry->hash);
- cur_entry->lte = lte;
- }
-}
-
-static void inode_unresolve_ltes(struct inode *inode)
-{
- wimlib_assert(inode->resolved);
- if (inode->lte)
- copy_hash(inode->hash, inode->lte->hash);
- else
- zero_out_hash(inode->hash);
-
- for (u16 i = 0; i < inode->num_ads; i++) {
- if (inode->ads_entries[i].lte)
- copy_hash(inode->ads_entries[i].hash,
- inode->ads_entries[i].lte->hash);
- else
- zero_out_hash(inode->ads_entries[i].hash);
- }
- inode->resolved = 0;
-}
-
-/* Resolve a dentry's lookup table entries