recalculate_dentry_size(): Do not include ADS entries size
authorEric Biggers <ebiggers3@gmail.com>
Sat, 18 Aug 2012 05:21:02 +0000 (00:21 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 18 Aug 2012 05:21:02 +0000 (00:21 -0500)
src/dentry.c

index 42681518155b832d563dc19990c12fff8688390c..d2ce4e8c3b437ecae7b6a888f91c56a11335cda5 100644 (file)
@@ -541,9 +541,7 @@ void unlink_dentry(struct dentry *dentry)
 static inline void recalculate_dentry_size(struct dentry *dentry)
 {
        dentry->length = WIM_DENTRY_DISK_SIZE + dentry->file_name_len + 
-                        2 + dentry->short_name_len;
-       for (u16 i = 0; i < dentry->num_ads; i++)
-               dentry->length += ads_entry_length(&dentry->ads_entries[i]);
+                        2 + dentry->short_name_len + 2;
        /* Must be multiple of 8. */
        dentry->length = (dentry->length + 7) & ~7;
 }