]> wimlib.net Git - wimlib/blobdiff - src/inode.c
Save memory by using hlist for i_dentry
[wimlib] / src / inode.c
index 16ae0d229915eb9a6fe65505cfda35a1a67bb5ee..a181e885753efde4b5a054b38166c0c0f8b90cd5 100644 (file)
@@ -56,8 +56,8 @@ new_inode(struct wim_dentry *dentry, bool set_timestamps)
 
        inode->i_security_id = -1;
        /*inode->i_nlink = 0;*/
-       inode->i_not_rpfixed = 1;
-       INIT_LIST_HEAD(&inode->i_dentry);
+       inode->i_rp_flags = WIM_RP_FLAG_NOT_FIXED;
+       INIT_HLIST_HEAD(&inode->i_dentry);
        inode->i_streams = inode->i_embedded_streams;
        if (set_timestamps) {
                u64 now = now_as_wim_timestamp();
@@ -108,7 +108,7 @@ d_associate(struct wim_dentry *dentry, struct wim_inode *inode)
 {
        wimlib_assert(!dentry->d_inode);
 
-       list_add_tail(&dentry->d_alias, &inode->i_dentry);
+       hlist_add_head(&dentry->d_alias, &inode->i_dentry);
        dentry->d_inode = inode;
        inode->i_nlink++;
 }
@@ -125,7 +125,7 @@ d_disassociate(struct wim_dentry *dentry)
 
        wimlib_assert(inode->i_nlink > 0);
 
-       list_del(&dentry->d_alias);
+       hlist_del(&dentry->d_alias);
        dentry->d_inode = NULL;
        inode->i_nlink--;
 
@@ -498,8 +498,8 @@ blob_not_found_error(const struct wim_inode *inode, const u8 *hash)
 }
 
 /*
- * Return the blob descriptor for the specified stream, or NULL if the blob for
- * the stream is empty or not available.
+ * Return the blob descriptor for the specified stream, or NULL if the stream is
+ * empty or its blob is not available in @table.
  */
 struct blob_descriptor *
 stream_blob(const struct wim_inode_stream *strm, const struct blob_table *table)
@@ -523,9 +523,9 @@ stream_hash(const struct wim_inode_stream *strm)
 
 /*
  * Return the blob descriptor for the unnamed data stream of the inode, or NULL
- * if the inode does not have an unnamed data stream, the blob for the inode's
- * unnamed data stream is empty, or the blob for the inode's unnamed data stream
- * is not available in @blob_table.
+ * if the inode does not have an unnamed data stream, the inode's unnamed data
+ * stream is empty, or the blob for the inode's unnamed data stream is not
+ * available in @blob_table.
  */
 struct blob_descriptor *
 inode_get_blob_for_unnamed_data_stream(const struct wim_inode *inode,