summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <Amit.Pundir@linaro.org>2013-02-06 01:29:02 +0530
committerAmit Pundir <Amit.Pundir@linaro.org>2013-02-06 01:29:02 +0530
commit3d39ba888f1865e7dd80482d94b95734031069ef (patch)
tree6528c186e2bee10cef9c06593fe9020ecf17df9b
parent463536c2eea59f07f517df3a5d87b01ab39006eb (diff)
parent6a73c51fbf0dfacedc21614b112a1a3f26820afb (diff)
downloadextras-linaro_android_4.2.1.tar.gz
Merge android-4.2.1_r1.2:linaro_android_4.2.1
Android 4.2.1 release 1.2 # gpg: Signature made Sat Feb 2 02:15:32 2013 IST using DSA key ID 9AB10E78 # gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 4340 D135 70EF 945E 8381 0964 E8AD 3F81 9AB1 0E78 * tag 'android-4.2.1_r1.2': make_ext4fs: fix dentry padding when dentry size is 4088 or 4092
-rw-r--r--ext4_utils/contents.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index 345ab1ef..aeed31ee 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -44,11 +44,6 @@ static u32 dentry_size(u32 entries, struct dentry *dentries)
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;
}
@@ -160,11 +155,8 @@ u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries,
}
}
- 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;
}