shithub: lwext4

Download patch

ref: ffc811b4e0b2a4618f857923c0ce235fd3996692
parent: 48d955206bccfd6d4fe25ad0934765428fe7fda2
author: Kaho Ng <ngkaho1234@gmail.com>
date: Mon Feb 27 19:17:43 EST 2017

ext4_fs: set i_extra_isize to ext4_sblock::min_extra_isize

--- a/src/ext4_fs.c
+++ b/src/ext4_fs.c
@@ -920,8 +920,7 @@
 	ext4_inode_set_flags(inode, 0);
 	ext4_inode_set_generation(inode, 0);
 	if (inode_size > EXT4_GOOD_OLD_INODE_SIZE) {
-		uint16_t off = offsetof(struct ext4_inode, extra_isize);
-		uint16_t size = sizeof(struct ext4_inode) - off;
+		uint16_t size = ext4_get16(&fs->sb, want_extra_isize);
 		ext4_inode_set_extra_isize(&fs->sb, inode, size);
 	}