]> wimlib.net Git - wimlib/blobdiff - include/wimlib/dentry.h
Save memory by using a singly-linked list for extraction aliases
[wimlib] / include / wimlib / dentry.h
index 40a4c8e67d7e259a5be7a69a2dd2e5a6dc63fa71..c6d1f12d28df0c373c80e61f40330d861204c5ea 100644 (file)
@@ -57,7 +57,7 @@ struct wim_dentry {
 
        /* Linked list node that places this dentry in the list of aliases for
         * its inode (d_inode) */
-       struct list_head d_alias;
+       struct hlist_node d_alias;
 
        /* Pointer to the UTF-16LE short filename (malloc()ed buffer), or NULL
         * if this dentry has no short name.  */
@@ -116,18 +116,12 @@ struct wim_dentry {
         * extracted as part of the current extraction operation.  */
        struct list_head d_extraction_list_node;
 
-       /* (Extraction only) Linked list node that connects all dentries being
-        * extracted as aliases of the same inode as part of the current
-        * extraction operation.  */
-       struct list_head d_extraction_alias_node;
+       /* (Extraction only) Pointer to the next alias for this dentry's inode
+        * that needs to be extracted as part of the current extraction
+        * operation, or NULL if this is the last alias.  */
+       struct wim_dentry *d_next_extraction_alias;
 };
 
-static inline bool
-dentry_is_first_in_inode(const struct wim_dentry *dentry)
-{
-       return inode_first_dentry(dentry->d_inode) == dentry;
-}
-
 static inline bool
 will_extract_dentry(const struct wim_dentry *dentry)
 {