Commits

Colin Cross  committed 3861978 Merge

Merge "make_ext4fs: fix dentry padding when dentry size is 4088 or 4092"

  • Participants
  • Parent commits 1eda334, 8748938

Comments (0)

Files changed (1)

File ext4_utils/contents.c

 		len += dentry_len;
 	}
 
-	/* include size of the dentry used to pad until the end of the block */
-	if (len % info.block_size + 8 > info.block_size)
-		len += info.block_size - (len % info.block_size);
-	len += 8;
-
 	return len;
 }
 
 		}
 	}
 
-	dentry = (struct ext4_dir_entry_2 *)(data + offset);
-	dentry->inode = 0;
-	dentry->rec_len = len - offset;
-	dentry->name_len = 0;
-	dentry->file_type = EXT4_FT_UNKNOWN;
+	/* pad the last dentry out to the end of the block */
+	dentry->rec_len += len - offset;
 
 	return inode_num;
 }