shithub: lwext4

Download patch

ref: 190cc44e4cf4486c13ee43041167490f228fb110
parent: e5f33a98b0385a0281138abb60645db92f309e8a
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Thu Oct 29 15:25:25 EDT 2015

FIX: ext4_extent_full.c: should not assign checksum to extent root(in inode)

--- a/lwext4/ext4_extent_full.c
+++ b/lwext4/ext4_extent_full.c
@@ -1151,6 +1151,7 @@
 		    to_le16(ext4_ext_space_block(inode_ref));
 
 	neh->magic = to_le16(EXT4_EXTENT_MAGIC);
+	ext4_extent_block_csum_set(inode_ref, neh);
 
 	/* Update top-level index: num,max,pointer */
 	neh = ext_inode_hdr(inode_ref->inode);
@@ -1165,7 +1166,6 @@
 	}
 	neh->depth = to_le16(to_le16(neh->depth) + 1);
 
-	ext4_extent_block_csum_set(inode_ref, neh);
 	bh.dirty = true;
 	inode_ref->dirty = true;
 	ext4_block_set(inode_ref->fs->bdev, &bh);