+ /* On success, all the inodes have been moved to the image inode list,
+ * so there's no need to delete from from the hash lists in the inode
+ * table before freeing the hash buckets array directly. */
+ ret = 0;
+ goto out_destroy_inode_table_raw;
+out_destroy_inode_table:
+ for (size_t i = 0; i < inode_tab.capacity; i++) {
+ struct hlist_node *cur, *tmp;
+ hlist_for_each_entry_safe(inode, cur, tmp, &inode_tab.array[i], i_hlist)
+ hlist_del_init(&inode->i_hlist);
+ }
+ {
+ struct wim_inode *tmp;
+ list_for_each_entry_safe(inode, tmp, &inode_tab.extra_inodes, i_list)
+ list_del_init(&inode->i_list);
+ }
+out_destroy_inode_table_raw:
+ destroy_inode_table(&inode_tab);
+out: