Revert "Match create_composite_disk to crosvm updates"

This reverts commit 8ab826391437b86bf45ed98d2f76edd3cc864668.

Reason for revert: Dependent CL was not merged: https://android-review.googlesource.com/c/platform/external/crosvm/+/2037643

Change-Id: I997ff3f2540ec5c4e04e6140789ea19e58b774ac
diff --git a/virtualizationservice/src/composite.rs b/virtualizationservice/src/composite.rs
index aee84cd..cb814f3 100644
--- a/virtualizationservice/src/composite.rs
+++ b/virtualizationservice/src/composite.rs
@@ -94,8 +94,8 @@
                 .as_ref()
                 .try_clone()
                 .context("Failed to clone partition image file descriptor")?;
+            let size = get_partition_size(&file)?;
             let path = fd_path_for_file(&file);
-            let size = get_partition_size(&file, &path)?;
             files.push(file);
 
             Ok(PartitionInfo {
@@ -119,9 +119,9 @@
 /// Find the size of the partition image in the given file by parsing the header.
 ///
 /// This will work for raw, QCOW2, composite and Android sparse images.
-fn get_partition_size(partition: &File, path: &Path) -> Result<u64, Error> {
+fn get_partition_size(partition: &File) -> Result<u64, Error> {
     // TODO: Use `context` once disk::Error implements std::error::Error.
-    Ok(create_disk_file(partition.try_clone()?, MAX_NESTING_DEPTH, path)
+    Ok(create_disk_file(partition.try_clone()?, MAX_NESTING_DEPTH)
         .map_err(|e| anyhow!("Failed to open partition image: {}", e))?
         .get_len()?)
 }